Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^9: perl 5.12 BSD portability (CPAN test result)...print

by ikegami (Pope)
on Mar 19, 2013 at 01:21 UTC ( #1024180=note: print w/ replies, xml ) Need Help??


in reply to Re^8: perl 5.12 BSD portability (CPAN test result)...print
in thread perl 5.12 BSD portability (CPAN test result)...print

So you want me to explains how it's impossible to write the method without the print operator? Well, why don't you try it.

Or are you asking me to explain why they don't do the same thing? Well, consider

>perl -le"$x = 'abc'; print $x;" abc

As you can see, it doesn't call the method $x of class abc. If it was an indirect method call, it would have the following outcome:

>perl -le"$x = 'abc'; $x->print;" Can't locate object method "print" via package "abc" (perhaps you forg +ot to load "abc"?) at -e line 1.


Comment on Re^9: perl 5.12 BSD portability (CPAN test result)...print
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-07-10 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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








    Results (198 votes), past polls