Skip Menu |

This queue is for tickets about the Object-InsideOut CPAN distribution.

Report information
The Basics
Id: 16638
Status: resolved
Worked: 4 hours (240 min)
Priority: 0/
Queue: Object-InsideOut

Owner: jdhedden [...]
Requestors: ncc [...]

Bug Information
Severity: Normal
Broken in: 1.24
Fixed in: 1.25


Subject: Fields not accessible in automethods
Download (untitled) / with headers
text/plain 310b
All tests in 14-auto_cc.t fail for me, using Perl 5.6.1 on a FC3 machine (obviously, not the perl installation provided by the OS.) I've investigated the first test in that file and produced a minimalist example of the problem. Interestingly, if you uncomment the only commented line, the problem disappears.
text/x-perl 1.2k
use strict; use warnings; package My::Info; { use Object::InsideOut; my @info :Field('Accessor' => 'info'); sub auto : Automethod { my $self = $_[0]; my $class = ref($self) || $self; my $name = $_; # print STDERR \@info, "\n"; $DB::single=1; return sub { print STDERR \@info, "\n"; my $self = $_[0]; return join(',', $$self, $name, $info[$$self], $self->info); }; } sub static { my $self = $_[0]; print STDERR \@info, "\n"; return join(',', $$self, 'flog', $info[$$self], $self->info ); } } package main; MAIN: { my $obj = My::Info->new(); $obj->info('test'); print(join("\n", $obj->static() ), "\n\n"); my @results = $obj->flog(); print(join("\n", @results), "\n\n"); print(join("\n", $obj->static() ), "\n\n"); } exit(0);
Download (untitled) / with headers
text/plain 168b
The problem is caused by a bug in Perl 5.6.0 through 5.8.0. I have updated the tests to workaround this bug, and I have added information in the POD on the workaround.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to