develooper Front page | perl.moose | Postings from February 2009

Re: implications of using Any::Moose

Thread Previous | Thread Next
From:
Sartak
Date:
February 27, 2009 22:17
Subject:
Re: implications of using Any::Moose
Message ID:
e7e9b6ab0902272217lad26c15m99357c75acf03237@mail.gmail.com
Hi Jonathan,

On Fri, Feb 27, 2009 at 7:27 PM, Jonathan Swartz <swartz@pobox.com> wrote:
> (resent - first attempt seemed to have gotten lost)
>
> I'm thinking of switching the CHI distribution from Moose to Any::Moose, as
> a way to reduce install dependencies and overhead. The Mouse feature set is
> adequate for my needs.
>
> But I realized that classes could get split between Moose and Mouse
> depending on if/when Moose was loaded. e.g.

This is certainly an issue that we ran into with Squirrel. One of the
reasons I wrote Any::Moose (other than having the far better name) was
to address this issue.

Once Any::Moose chooses Moose or Moose at runtime, it will continue to
use the same backer. If you find that's not the case please let me
know.

There's a test in Any::Moose to ensure this happens:
http://tinyurl.com/bgyzvf . Notice how on line 27 Moose is loaded, but
the line 32 Any::Moose still gives you Mouse.

Shawn

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