Skip Menu |

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

Report information
The Basics
Id: 4041
Status: new
Priority: 0/
Queue: Class-Loader

People
Owner: Nobody in particular
Requestors: Gunnar.Strand [...] gustra.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.02
Fixed in: (no value)



Subject: Cannot handle references
Hi, I think I have found a bug in the Class::Loader 2.02 that it cannot handle references as argument to the constructor for the created class. I see that __prepare_args uses Dumper to dump the arguments and then the "filtered" arguments are given to the constructor method. If I understand correctly, this will create a new reference as well so that the reference no longer refers to the same data. In my case that it a Tk widget and Tk seems to be a little upset by that. Here are the relevant pieces of code: 56: my $topass = __prepare_args ($args); 57: $object = eval "$module->$constructor($topass)" or return; 82:sub __prepare_args { 83: 84: my $topass = Dumper shift; ... There is probably a good reason for dumping the data, and I am not fluent enough in Perl to implement support for references. I can live with the limitation, but in that case perhaps the documentation could be updated? Kind Regards, Gunnar Environment: Using ActivePerl perl: This is perl, v5.8.0 built for MSWin32-x86-multi-thread Class-Loader-2.02 Windows XP Professional, Version 2002 SP1