[Catalyst] Problem flattening arrays in Catalyst/Helper/Model/DBIC/Schema

pablo marin-garcia harpactocrates at googlemail.com
Thu Aug 27 20:52:55 GMT 2009


Hello Tomas

On Thu, Aug 27, 2009 at 1:19 AM, Tomas Doran<bobtfish at bobtfish.net> wrote:
>
> On 26 Aug 2009, at 23:25, pablo marin-garcia wrote:
>>
>> Seems that any Moosy thing will fail because my autobox problem. But
>> autobox is OK in my system (all test passed) so the problem seems to
>> between Moose arrays and the flatten call as a OOmethod.
>
> Erm, no.
>
> NOT any Moosy thing. Just things using Moose::Autobox.

Thanks!!! with the new MooseX it works!

Now follows the rest of my email that I wrote before reading your PS.
I leave here for mailarchive-indexing just in case

> When you said perl
> 5.8, could you be a little more specific please?
>

This is perl, v5.8.8 built for i686-linux-thread-multi

> Like which version of perl 5.8, what your perl -V says, which versions of
> Moose, Moose::Autobox and autobox you have would be helpful details..

cpan[1]> m /Autobox/
CPAN: Storable loaded ok (v2.15)
Going to read /nfs/users/nfs_p/pg4/.cpan/Metadata
  Database was generated on Wed, 26 Aug 2009 00:27:03 GMT
Module  = Moose::Autobox         (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Array  (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Code   (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Defined (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Hash   (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Indexed (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Item   (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::List   (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Number (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Ref    (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Scalar (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::String (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Undef  (RJBS/Moose-Autobox-0.09.tar.gz)
Module  = Moose::Autobox::Value  (RJBS/Moose-Autobox-0.09.tar.gz)
Module    Perl6ish::Autobox      (GUGOD/Perl6ish-0.02.tar.gz)
Module    Ruby::autobox          (GFUJI/Ruby-0.07.tar.gz)
Module    Rubyish::Autobox       (GUGOD/Rubyish-0.32.tar.gz)
Module    Shell::Autobox         (CHOCOLATE/Shell-Autobox-0.03.tar.gz)
Module  = autobox                (CHOCOLATE/autobox-2.55.tar.gz)
Module    autobox::Closure::Attributes
(SARTAK/autobox-Closure-Attributes-0.04.tar.gz)
Module    autobox::Core          (SWALTERS/autobox-Core-0.6.tar.gz)
Module    autobox::DateTime::Duration
(MIYAGAWA/autobox-DateTime-Duration-0.02.tar.gz)
Module    autobox::Encode        (TOKUHIROM/autobox-Encode-0.03.tar.gz)
Module    autobox::List::Util    (COWENS/autobox-List-Util-20090629.tar.gz)
Module    autobox::Numeric::Bytes (HIROSE/autobox-Numeric-Bytes-0.02.tar.gz)
Module    autobox::Numeric::Time (HIROSE/autobox-Numeric-Time-0.02.tar.gz)
Module    autobox::String::Inflector
(KAMIPO/autobox-String-Inflector-0.01.tar.gz)
Module    autobox::array::dump   (N/A)
Module    autobox::dump          (COWENS/autobox-dump-20090426.1746.tar.gz)
Module    autobox::hash::dump    (N/A)
Module    autobox::scalar::dump  (N/A)


>
> FYI, there is no such thing as a 'Moose array', can you explain what you
> mean here? Also ->flatten as a method call is what Moose::Autobox gives you
> (a set of methods you can call on native data types)..


When I was saying Moose array I was meaning the ArrayRef constraint
isa => ArrayRef
I have no experience with Moose, but I was assuming that or Moose
bless the array to be able to call methods, or there is an operator
overloading changing the meaning of the '->'. But anyway, I just
started with Moose and still don't know how it operates its magic.
>
> I'm just not seeing how Moose::Autobox can pass it's tests for you (which
> involve ->flatten working), but fail when run for real..

This is the thing that puzzled me. Probably I have installed an unused
dependency in the past with force  and now is hitting me back.

I will leave this as it is at the moment. Probably this would be a
problem with my configuration [I don't have root access at work] and
this was an install in my home dir to play with catalyst in order to
have something before asking my system administrator to install the
whole thing in the development server. I managed to install it in my
macbook so I can use it with the new catalyst book :-).

I leave this here for the internet archive, I would come back when I
have a better understanding how to debug and follow Moose magic to
narrow down the place of the error. But I am sure that if I create a
new PER5LIB only for catalyst and install all from scratch it will
work. I would try to find the time some day ;-)

Thankgs

> Cheers
> t0m
>
> P.S. http://pause.perl.org/incoming/MooseX-Traits-Pluggable-0.08.tar.gz -
> Now without autobox, please install this and try again?
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
   - Pablo Marin-Garcia



More information about the Catalyst mailing list