Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Object Oriented Perl - very basic guide

by morgon (Deacon)
on May 15, 2014 at 15:27 UTC ( #1086164=note: print w/ replies, xml ) Need Help??


in reply to Re: Object Oriented Perl - very basic guide
in thread Object Oriented Perl - very basic guide

You can even bless a scalar
Just for clarification (you meant that of course): You cannot bless a scalar, you can bless a reference to a scalar (as any other type of reference - I would recommend to bless a directory handle :-)


Comment on Re^2: Object Oriented Perl - very basic guide
Re^3: Object Oriented Perl - very basic guide
by choroba (Abbot) on May 15, 2014 at 15:36 UTC
    You didn't quote the whole phrase: You can ever bless a scalar (...) or code reference.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      If you parse that as "(a ((scalar or code) reference)" then what you said wasn't wrong. However, if you parse that as "(a (scalar) or (code reference))" like morgon and I did, then you'll have to admit that morgon has a point.

      However, a reference is a scalar of course, so technically a claim that "you can even bless a scalar" isn't incorrect as much as it's redundant, given that you can only bless references :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-11-26 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (160 votes), past polls