I boiled it down to an example in these two modules (they don't reflect the actual code). For sake of argument, they're just entitled module1 and module2:
the other module contains:use strict; use lib ('./'); require 'module2.pl'; Alice->mTest2 ("Some stuff", "and something else"); 1;
use strict; package Alice; sub mTest2 { my ($junk, $and) = @_; print "$junk=$junk\n\$and=$and"; }
Some stuff
and something else.
Instead I get:
Alice
Some stuff
Ok, after doing some searching and a bit of experimentation, I can see where a person would want to know the context the function is called. I fried my brain and all I can come up with is a shift on the @_ to look for the object name. If it matches, then proceed to get the rest of the array. If it doesn't match, then assume it's a variable I want to keep and proceed accordingly. But this seems really sloppy when all I really care about is the variables I want to deal with, not the package name.
I guess what I'm asking is, can someone clarify if this is some sort of error on my part, or is this perfect behavior (which I assume it is)? I tried to flip through the Camel to see if this is mentioned, but I can't find it :(
Gah! I need coffee...
----
Thanks for your patience.
In reply to Unexpected value in incoming variable. by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |