develooper Front page | perl.moose | Postings from July 2011

Re: Using Moose with Expect.pm

Thread Previous | Thread Next
From:
Jesse Luehrs
Date:
July 18, 2011 15:45
Subject:
Re: Using Moose with Expect.pm
Message ID:
20110718224540.GT26428@tozt.net
On Mon, Jul 18, 2011 at 10:18:25PM +0000, Arne Romo wrote:
> I need help understanding how to use Moose to "extend" Expect.pm.
> It occurred to me that since Expect.pm is a non-moose module I need the
>     "use MooseX::NonMoose;"
> but my simple test program still fails.
> 
> Below I've include my simple perl script showing it fail when I use the
> "extends" and passing if I comment out the "extends".
> Clearly I'm missing something or need some higher level kungfu here 8)
> 
> Any help / simple working example would be greatly appreciated.
> This is my first foray into the Moose world so I'm just starting to learn
> this critter.
>     -Arne

Expect.pm doesn't use hashrefs for objects, so you need to tell Moose
how to handle that. The easiest way is to use
MooseX::NonMoose::InsideOut rather than MooseX::NonMoose.

-doy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About