Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 17865
Status: open
Priority: 0/
Queue: Class-Field

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

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: 0.12

Attachments


Subject: Does not set the namespace of the field accessors
Download (untitled) / with headers
text/plain 417b
Some packages such as Class::Tie::InsideOut and Class::C3 require that the caller() information from accessors match the actual packages they are in. Class::Fields doesn't set this. Attached is a patch to fix that. Note that an alternative way to do this is to use Sub::Name, but that requires an additional dependency (and a compiler). The patch uses a pure-Perl version. No tests for this are attached, though.
Subject: Class-Field.diff
Download Class-Field.diff
text/x-diff 368b
diff -r Class-Field-0.12/lib/Class/Field.pm Class-Field-0.12.orig/lib/Class/Field.pm 7,8c7 < our $VERSION = '0.12_01'; < $VERSION = eval $VERSION; --- > our $VERSION = '0.12'; 13c12 < "sub {\n local \*__ANON__ = \"%s::%s\";\n", --- > "sub {\n", 56c55 < my $code = sprintf $code{sub_start}, $package, $field; --- > my $code = $code{sub_start};
From: rrwo [...] cpan.org
Download (untitled) / with headers
text/plain 218b
Note that the patch doesn't fix the namespace for the const method. To do that would remove a potential Perl optimisation for the default. The only other option then would be to use Sub::Name to set the namespace.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.