Skip Menu |
 

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

Report information
The Basics
Id: 104369
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

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



Subject: FR (feature request): allow accesors to be lvalue
Download (untitled) / with headers
text/plain 198b
I get error: Can't modify non-lvalue subroutine call When trying to do: sub new/update { my( $self, ... ) = @_; ... $self->id = $ID; $self->name = $user; } It will be good to have this feature.
Download (untitled) / with headers
text/plain 664b
On Tue May 12 09:36:26 2015, kes-kes@yandex.ru wrote: Show quoted text
> I get error: Can't modify non-lvalue subroutine call > > When trying to do: > sub new/update { > my( $self, ... ) = @_; > ... > $self->id = $ID; > $self->name = $user; > } > > It will be good to have this feature.
Lvalue methods never caught on in the world of perl, and have a number of latent issues even in the latest 5.22-to-be. As such the core of DBIC will not be providing lvalue subs. However keep in mind that DBIC is designed for extensibility. There is nothing preventing you from writing your own DBIx::Class::LvalueAccessors and putting it on CPAN. Closing this ticket as "wontimplement"


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.