Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 50901
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: j.bonte [...] legian.nl
Cc:
AdminCc:

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



I was trying to alias a command while working with roles and found that it was not working. I got the example code from: Moose::Cookbook::Roles::Recipe3 MyApp::Role::Job::Manager->meta->apply( $lisa, -alias => { assign_work => 'get_off_your_lazy_behind' }, ); This simply does not work. Can't locate object method "get_off_your_lazy_behind" via package ... Looking at working code I found that the '-alias' command was used as 'alias'. When I changed the example code to MyApp::Role::Job::Manager->meta->apply( $lisa, alias => { assign_work => 'get_off_your_lazy_behind' }, ); Things where working as expected. I also tested this with Recipe2 and with '-exclude vs exclude' Same result. with the '-' it does not work, without it it works fine. Please update the documentation in the example code.
We added -alias recently (version 0.89_01), with the intention of eventually replacing 'alias' with it (similarly for excludes). Both 'alias' and '-alias' should work at the moment (and they do for me), are you sure you're running a new enough version? -doy
On Wo. Okt. 28 10:30:18 2009, DOY wrote: Show quoted text
> We added -alias recently (version 0.89_01), with the intention of > eventually replacing 'alias' with it (similarly for excludes). Both > 'alias' and '-alias' should work at the moment (and they do for me), are > you sure you're running a new enough version? > > -doy
I'm running version 0.87 of Moose. With version 0.87 of Moose::Util on perl v5.8.7 built for sun-solaris Looks like I'm running the wrong version of Moose. I will upgrade, thanks.