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

Shouldn't LITERAL references be readonly? (updated)

by LanX (Cardinal)
on Aug 04, 2020 at 17:18 UTC ( #11120285=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     DB<18> use Scalar::Util qw/readonly/
    
    ...
      1
      1
     DB<26>
    
  2. or download this
      DB<32> x map { $_ = 1 } "str"
    Modification of a read-only value attempted at (eval 42)[c:/Perl_524/l
    +ib/perl5db.pl:737] line 2.
    ...
    Modification of a read-only value attempted at (eval 43)[c:/Perl_524/l
    +ib/perl5db.pl:737] line 2.
      DB<34> x map { $_ = 1 } undef
    Modification of a read-only value attempted at (eval 44)[c:/Perl_524/l
    +ib/perl5db.pl:737] line 2.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2020-11-23 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?