The constructor for the HASH based objects has the equivalent code:
sub new {
my $class = shift;
return bless { @_ }, ref($class)||$class;
}
I suggest that for the ARRAY based objects you take a similar approach:
sub new {
my $class = shift;
return bless [ @_ ], ref($class)||$class;
}
It may not satisfy everyone, but it is consistent between both object
types and will improve the performance for the very simple cases.
For the more complex cases, or where this strategy does not fit the
project, the user can just hand-code his own constructor.
Thanks,
Paulo
This queue is for tickets about the Class-XSAccessor CPAN distribution.
Report information
The Basics
People
Owner:
Nobody in particular
Requestors:
PSCUST [...] cpan.org
Cc:
AdminCc:
BugTracker
Severity:
Wishlist
Broken in:
1.08
Fixed in:
(no value)
This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.
Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.