Just another Perl shrine | |
PerlMonks |
Re: Capitalized subroutine names and packagesby Corion (Patriarch) |
on Jan 05, 2003 at 20:39 UTC ( [id://224466]=note: print w/replies, xml ) | Need Help?? |
It prints Foo's constructor called, because of the following circumstances (and that's my interpretation) :
To circumvent this problem, either make it that [Pp]erl dosen't see Bar as a function name :
or call Bar::new() manually, and specify the wanted class name on the parameter list :
I don't know where in the documentation to look to find some text on this behaviour, but most likely one of the elder Perl users can explain the sequence of events from the documentation (or correct my sequence).
In Section
Meditations
|
|