Initial commit from the 2013 with minor fixes. From now and then,
[perlbook.git] / l55.pl
blobecf1550883812ddecb0d00bcc69aa892df28a0a2
1 package mycounter;
3 BEGIN {
4 use Exporter();
5 @ISA= qw(Exporter);
6 @EXPORT= qw(&inc &dec &show);
9 our $counter= 0;
10 sub inc {$counter++;}
11 sub dec {$counter--;}
12 sub show {print "$counter\n";}
14 AUTOLOAD {print "No such funkshun '$AUTOLOAD'\n"};
16 return 1;
17 END {}