Weird Moose::Autobox behaviour

2009-05-03 Thread fREW Schmidt
I'm resending this because I wasn't subscribed before. Sorry. -- Forwarded message -- From: fREW Schmidt fri...@gmail.com Date: May 3, 2009 2:14 AM Subject: Weird Moose::Autobox behaviour To: moose@perl.org Hello all, This is really strange. I am trying to use Moose::Autobox

How to make this nicer

2009-05-03 Thread Yuri Shtil
Hi All, Here is a piece of code I have: - package X::Project; use Moose; extends 'X'; use MooseX::AttributeHelpers; use Moose::Util::TypeConstraints; use namespace::clean; use MooseX::Method qw/:compiled/; method procedures = sub { CODE }; subtype 'Procedure' = as Any = where { my $type

Re: How to make this nicer

2009-05-03 Thread Hans Dieter Pearcey
On Sun, May 03, 2009 at 11:00:30AM -0700, Yuri Shtil wrote: I have a bunch of subclasses of X like this all having similar code. For example in the class X::Procedure I would have the same code with procedure replaced by step. use MooseX::Role::Parameterized hdp.

Re: Weird Moose::Autobox behaviour

2009-05-03 Thread Hans Dieter Pearcey
On Sun, May 03, 2009 at 10:24:54AM -0500, fREW Schmidt wrote: [ %{$data}-values-map-(sub { $_ + 1 }) ] don't dereference $data; your sanity check example uses a hashref, not a hash, so it works fine. hdp.

Re: Weird Moose::Autobox behaviour

2009-05-03 Thread fREW Schmidt
On Sun, May 3, 2009 at 2:22 PM, Hans Dieter Pearcey h...@pobox.com wrote: On Sun, May 03, 2009 at 10:24:54AM -0500, fREW Schmidt wrote: [ %{$data}-values-map-(sub { $_ + 1 }) ] don't dereference $data; your sanity check example uses a hashref, not a hash, so it works fine. I must

Re: Weird Moose::Autobox behaviour

2009-05-03 Thread Chris Prather
On Sun, May 3, 2009 at 11:56 PM, fREW Schmidt fri...@gmail.com wrote: On Sun, May 3, 2009 at 2:22 PM, Hans Dieter Pearcey h...@pobox.com wrote: On Sun, May 03, 2009 at 10:24:54AM -0500, fREW Schmidt wrote:       [ %{$data}-values-map-(sub { $_ + 1  }) ] don't dereference $data; your sanity