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

Re: Readonly oddity

by mr_ron (Chaplain)
on Jan 28, 2016 at 00:58 UTC ( [id://1153807]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Type of arg 1 to Readonly::Readonly must be one of [$@%] (not scalar a
    +ssignment) at monk_ro.pl line 8, near "'bar';"
    Execution of monk_ro.pl aborted due to compilation errors.
    
  2. or download this
    perl -Mstrict -we 'sub f(\$){}; f(my $x)'
    
  3. or download this
    perl -Mstrict -we 'sub f(\$){}; f(my $x = 3)'
    
  4. or download this
    Type of arg 1 to main::f must be scalar (not scalar assignment) at -e 
    +line 1, near "3)
    
  5. or download this
    *** lib/Readonly-orig.pm        2016-01-27 11:21:02.875021600 -0500
    --- lib/Readonly.pm     2016-01-27 19:12:43.312714100 -0500
    ...
    
              my $tieobj = eval {tie ${$_[0]}, 'Readonly::Scalar', $_[1]};
              # Tie may have failed because user tried to tie a constant, 
    +or we screwed up somehow.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2024-04-18 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found