Trying to learn/use subroutine attributes. However, can't seem to take very first steps :(
Following example code, gives an error:
Invalid CODE attribute: hold at ./attr.pl line 6
What am I doing wrong?
Thanks for you help.
where attr.pl is :
----------------------------- #!/usr/bin/perl package XYZ; use strict; sub abc :hold { } sub MODIFY_CODE_ATTRIBUTES { my ($pack,$ref,$attrs) = @_; (); } sub FETCH_CODE_ATTRIBUTES { return ('hold'); } 1; __END__
In reply to learning subroutine attributes by super_drone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |