Skip Menu |

This queue is for tickets about the Class-Accessor-Lvalue CPAN distribution.

Report information
The Basics
Id: 33119
Status: open
Priority: 0/
Queue: Class-Accessor-Lvalue

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: lvalue accessors do not work with debugger
It seems that lvalue accessors do not work if called from the perl debugger. I tried the attached script. Running without the debugger works as expected: $ perl5.10.0 /tmp/bla.pl ok 1 1..1 But with the debugger I get an undef: perl5.10.0 -d /tmp/bla.pl Loading DB routines from perl5db.pl version 1.3 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(/tmp/bla.pl:6): package Foo; DB<1> c not ok 1 # Failed test at /tmp/bla.pl line 16. # got: undef # expected: 'bla' 1..1 # Looks like you failed 1 test of 1. This smells like a perl bug. I tried it with 5.8.8 (as packaged) and 5.10.0 (self-compiled), both on debian, with the same result. I think you're more skilled with handling lvalues, so it's up to you to report it to perl5 porters. Regards, Slaven
Subject: bla.pl
#!/usr/bin/perl use Test::More 'no_plan'; { package Foo; use strict; use base qw(Class::Accessor::Lvalue); __PACKAGE__->mk_accessors('bar'); sub new { bless {}, shift } } $foo = Foo->new; $foo->bar = "bla"; is($foo->bar, "bla");
On Mon Feb 11 11:02:40 2008, SREZIC wrote: Show quoted text
> > This smells like a perl bug. I tried it with 5.8.8 (as packaged) and > 5.10.0 (self-compiled), both on debian, with the same result. I think > you're more skilled with handling lvalues, so it's up to you to report > it to perl5 porters. >
It really looks like a perl issue, and an old and already known one: http://rt.perl.org/rt3/Public/Bug/Display.html?id=7013 Regards, Slaven