Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You're on the right track :)
See - this sub can be called by any method so I need to make sure everytime it's called I either shift off the package/class info or do nothing. My orgional code to do this (shift if ref $_[0] or $_[0] =~ /^PKG/;) doesn't work when your calling the sub by its fully-qualified "Package::method" name and $_[0] happens to be a hash ref. So maybe this will help in understanding my problem: shift if (ref $_[0] and $_[0]-is-the-ojbect-itself,-not-a-normal-hash-ref) or $_[0] =~ /^PKG/; In reply to Re: Re: Calling Madness
by Anonymous Monk
|
|