Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Readonly CPAN distribution.

Report information
The Basics
Id: 15326
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Readonly

People
Owner: eric.roode.cpan [...] gmail.com
Requestors: jamesr [...] tierra.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.03
Fixed in: (no value)



Subject: strange bug with & variable in perl 5.8.6
the simple perl script: use Readonly; Readonly my $test => ' '; print "$test$test\n"; displays:  p; for perl vesions 5.8.6 and 5.8.7 although it appears to work correctly for 5.8.5
[guest - Wed Oct 26 16:39:34 2005]: Show quoted text
> the simple perl script: > > use Readonly; > Readonly my $test => ' '; > print "$test$test\n"; > > displays: > ' p;' > > for perl vesions 5.8.6 and 5.8.7 although it appears to work correctly > for 5.8.5
The string in my constant is &_n_b_s_p_; without the underscores. My browser at least annoyingly interprets that and doesn't display the literal in the bug report.
This is really quite interesting! "$test$test" is broken, but "$test $test" or "$test-$test" isn't. I will definitely dig into it. Thanks for reporting the problem! Eric
Appears to be a bug in perl itself. The same behavior happens with this trivial program: #!/usr/bin/perl use strict; package TieTest; sub TIESCALAR {return bless {} } sub FETCH {return 'test' } package main; tie my $test, 'TieTest'; print "$test$test"; print "$test $test"; I will report this as a perl bug.
This is due to a bug, apparently in all versions of perl 5.8.x, relating to tied scalars. This has been reported via perlbug, and is ticket number 37731.