saintex has asked for the wisdom of the Perl Monks concerning the following question:
has mode =>(is => 'ro',accessor=>'creaLog', isa => 'Str',required => 1 +);
sub creaLog { my $self = shift; $self->mode=>'changed' ; }
Cannot define an accessor name on a read-only attribute, accessors are + read/write at /usr/local/lib/perl/5.10.1/Moose/Meta/Attribute.pm lin +e 251
has mode =>(is => 'ro',writer=>'creaLog', isa => 'Str',required => 1);
Where I'm wrong?You are overwriting a locally defined method (creaLog) with an accesso +r at /usr/local/lib/perl/5.10.1/Moose/Meta/Attribute.pm line 663
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose: problem with accessor
by ikegami (Patriarch) on Mar 31, 2011 at 17:14 UTC | |
by saintex (Scribe) on Mar 31, 2011 at 19:32 UTC | |
by ikegami (Patriarch) on Mar 31, 2011 at 19:43 UTC | |
by saintex (Scribe) on Apr 01, 2011 at 07:38 UTC | |
by ikegami (Patriarch) on Apr 01, 2011 at 13:45 UTC | |
| |
|
Re: Moose: problem with accessor
by Anonymous Monk on Mar 31, 2011 at 17:00 UTC | |
|
Re: Moose: problem with accessor
by Fletch (Bishop) on Mar 31, 2011 at 17:13 UTC | |
by saintex (Scribe) on Mar 31, 2011 at 19:36 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |