repo.or.cz
/
perlbook.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial commit from the 2013 with minor fixes. From now and then,
[perlbook.git]
/
l55.pl
blob
ecf1550883812ddecb0d00bcc69aa892df28a0a2
1
package
mycounter
;
2
3
BEGIN
{
4
use
Exporter
();
5
@ISA
=
qw(Exporter)
;
6
@EXPORT
=
qw(&inc &dec &show)
;
7
}
8
9
our
$counter
=
0
;
10
sub
inc
{
$counter
++;}
11
sub
dec
{
$counter
--;}
12
sub
show
{
print
"
$counter
\n
"
;}
13
14
AUTOLOAD
{
print
"No such funkshun '
$AUTOLOAD
'
\n
"
};
15
16
return
1
;
17
END
{}