Cross Reference: demo_chain.pl
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
lib
/
Attribute
/
Handlers
/
demo
/
demo_chain.pl
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
1
N/A
#! /
usr
/
local
/
bin
/
perl
-w
1
N/A
1
N/A
use
Attribute
::
Handlers
;
1
N/A
1
N/A
sub
Prefix
:
ATTR
{
1
N/A
my
($
glob
, $
sub
) = @_[
1
,
2
];
1
N/A
no
warnings
'redefine'
;
1
N/A
*$
glob
=
sub
{
1
N/A
print
"This happens first\n"
;
1
N/A
$
sub
->(@_);
1
N/A
};
1
N/A
}
1
N/A
1
N/A
sub
Postfix
:
ATTR
{
1
N/A
my
($
glob
, $
sub
) = @_[
1
,
2
];
1
N/A
no
warnings
'redefine'
;
1
N/A
*$
glob
=
sub
{
1
N/A
$
sub
->(@_);
1
N/A
print
"This happens last\n"
;
1
N/A
};
1
N/A
}
1
N/A
1
N/A
sub
test
:
Postfix
Prefix
{
1
N/A
print
"Hello World\n"
;
1
N/A
}
1
N/A
1
N/A
test
();