Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Calling multi functions in a single statement

by akagrawal3 (Beadle)
on Apr 20, 2012 at 05:06 UTC ( #966076=note: print w/ replies, xml ) Need Help??


in reply to Re: Calling multi functions in a single statement
in thread Calling multi functions in a single statement

That sounds good. But from what you said I believe that there should be more than one XML_file subroutine so that once an object is returned by get_log_records() it could decide on which Package it should call XML_file(). Now if that is true, I found that the subroutine XML_file is only in one package and not in any other. So does that make any sense in executing  $logviewer->get_log_records()->XML_file(); . It could have rather just been written as

$logviewer->get_log_records(); $logviewer->XML_file();


Comment on Re^2: Calling multi functions in a single statement
Select or Download Code
Re^3: Calling multi functions in a single statement
by JavaFan (Canon) on Apr 20, 2012 at 08:45 UTC
    Just because XML_file is in the same class as get_log_records doesn't mean the two statements are equivalent. Perhaps they are. But that depends on what get_log_records returns. And it only depends on what get_log_records returns.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-07-09 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (197 votes), past polls