Skip Menu |

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

Report information
The Basics
Id: 61687
Status: open
Priority: 0/
Queue: Class-XSAccessor

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

Bug Information
Severity: Wishlist
Broken in: 1.08
Fixed in: (no value)



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
Hi, sorry for not replying earlier. I am willing to add constructors to the array variant of Class::XSAccessor, but I lack the time to write the code. What I could manage is review and apply a patch to add them. Best regards, Steffen