Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: What does @_[OBJECT, ARG0, ARG1] mean?by thomas895 (Deacon) |
on Feb 28, 2016 at 00:53 UTC ( [id://1156348]=note: print w/replies, xml ) | Need Help?? |
When you encounter things like this in the future, the Debugger is very useful. In particular, look at the X vars... (or V Package::Name vars...) commands. Try, for example,
There's nothing special about constants. All that constant.pm does is create a method in the package that returns the value you gave, by cleverly using import through use. Here's the relevant parts from constant.pm in 5.12.3:
Note: In the debugger output above, you may have noticed that it appeared as a regular variable. Indeed, in Perl 5.8 (as I understand it), constant.pm had some magic added to it so that scalars are simply added into the symbol table, appearing to be a package variable. Still, you can't really use them as variables, as you can observe here:
-Thomas "Excuse me for butting in, but I'm interrupt-driven..."
In Section
Seekers of Perl Wisdom
|
|