Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters
Readonly bug in 5.10.0
 

Index | Next | Previous | View Flat


jdhedden at cpan

Nov 28, 2007, 6:54 AM


Views: 126
Permalink
Readonly bug in 5.10.0

The following (attached):

#!/usr/bin/perl

use strict;
use warnings;

# Create a object from an anonymous scalar
my $obj1 = \do{ my $scalar = 1; }; # Object ID = 1
bless($obj1, 'Foo');

# Put the object's ID into a hash
my %ids;
$ids{$$obj1} = undef;


# Create a 2nd object
my $obj2 = \do{ my $scalar; };

# Set the 2nd object IDs from the hash
($$obj2) = keys(%ids);
delete($ids{$$obj2});

# Bless the 2nd object
bless($obj2, 'Foo'); # Causes "Modification of a read-only value..." error

# EOF

Produces:

Modification of a read-only value attempted at ./readonly_bug.pl line 23.

Can this be fixed before 5.10.0 goes out?
Attachments: readonly_bug.pl (0.49 KB)

Subject User Time
Readonly bug in 5.10.0 jdhedden at cpan Nov 28, 2007, 6:54 AM
    Re: Readonly bug in 5.10.0 jdhedden at cpan Nov 28, 2007, 6:58 AM
    Re: Readonly bug in 5.10.0 jdhedden at cpan Nov 28, 2007, 7:18 AM
    Re: Readonly bug in 5.10.0 rgarciasuarez at gmail Nov 28, 2007, 8:23 AM
    Re: Readonly bug in 5.10.0 nick at ccl4 Nov 28, 2007, 8:26 AM
        Re: Readonly bug in 5.10.0 nick at ccl4 Nov 28, 2007, 9:10 AM
            Re: Readonly bug in 5.10.0 jdhedden at cpan Nov 28, 2007, 9:21 AM
            Re: Readonly bug in 5.10.0 nick at ccl4 Nov 28, 2007, 9:55 AM
    Re: Readonly bug in 5.10.0 nick at ccl4 Nov 28, 2007, 9:54 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.