Hello group,
I'm trying to subclass a module (at least I think its what is called subclassing...)
This example below works but I'd like to package GD::Image::Foo in its own module, how would I go about doing that? perldoc perlmod and perlmodlib didn't seem to address that issue unless of course I'm confused which is most likely the case ;p
#!/usr/bin/perl
use strict; use warnings; use GD;
my $image = GD::Image->new(42,21); my $white = $image->colorAllocate(255,255,255); $image->transparent($white);
$image->Foo(1,5,9);
sub GD::Image::Foo { my $im = shift; # use @_ and $im-> here }
I'd like that to be:
#!/usr/bin/perl
use strict; use warnings; use GD; use GD::Image::Foo; # has sub GD::Image::Foo {} in it ...
my $image = GD::Image->new(42,21); my $white = $image->colorAllocate(255,255,255); $image->transparent($white);
$image->Foo(1,5,9);
Any docs/ideas most appreciated!
TIA
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>