- or download this
package Dragon
...
$self->{$key} = shift;
}
}
- or download this
package Dragon;
use strict;
...
print $self->get_color ." dragon awakens from his slumber!\n";
}
1;
- or download this
package Trogdor;
use strict;
...
print $self->get_name ." burninates the land!\n";
}
1;
- or download this
#!/usr/bin/perl
use strict;
...
my $smaug = new Dragon("Smaug","centuries old"); # create Smaug
my $trogdor = new Trogdor(); # create Trodgor
$trogdor->burninate(); # burninate!
- or download this
Using perl 5.8.1-RC3 unless otherwise noted.
Apache/1.3.33 (Darwin) unless otherwise noted.
Mac OS X 10.3.9 unless otherwise noted.