Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Confused on function call syntax

by NetWallah (Abbot)
on May 14, 2013 at 05:18 UTC ( #1033413=note: print w/ replies, xml ) Need Help??


in reply to Confused on function call syntax

That code uses the non-preferred "indirect object" notation:

methodname classname (params);
where $self represents the classname, because it is blessed into that class.

The identical process is better accomplished by re-writing that as:

my $map = $self->match_maprow_by_hash ( $first );
See "Method Call Variations" and '"indirect object" notation' in "perldoc perlobj".

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs


Comment on Re: Confused on function call syntax
Select or Download Code
Re^2: Confused on function call syntax
by dd-b (Monk) on May 14, 2013 at 05:23 UTC
    Thank you! The more I studied it the more it appeared that was what was actually happening, but I couldn't find any documentation on that syntax, so I needed at least some reassurance; maybe this was a more complicated situation that just looked like method calls in simple cases, or something.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033413]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (21)
As of 2014-08-22 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (161 votes), past polls