develooper Front page | perl.moose | Postings from August 2015

Re: 'around' method modifier does not seem to work

Thread Previous | Thread Next
Karen Etheridge
August 9, 2015 21:01
Re: 'around' method modifier does not seem to work
Message ID:
> On Sat, Aug 8, 2015 at 1:18 PM, Marcos Barbeitos <>

>     I get it to work.  Not a very elegant solution, for I must access the
attribute directly instead of using an accessor.

No, instead of
>             return $self->{sequence};
you should do
              return $self->$orig();
to use the proper reader mechanism.

>     One issue still remains though, if I pass the argument to the
>     my $collection = DCSE::Collection->new
>     (
>        id => 'test'
>      , sequence => $sequence
>      , helix => $dcse->helix
>     );
>     I believe that 'around' is not called, for I get the unparsed
argument when I fetch the attribute.

This should be fixed when you fix the code path for the reader as above.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About