Re: BUILD and how to create a subclass object when creating a parent

2018-04-25 Thread Karen Etheridge
I'm not sure you mean by create a subclass instance on creation of its superclass. Are you intending to have the superclass object have an attribute that holds an instance of the subclass? Perhaps can you show a diagram of what you intend your data to look like after construction is complete? On

Re: Annoying warning in Moose::Meta::Attribute; our $VERSION = '2.1604'

2016-01-19 Thread Karen Etheridge
Can you possibly provide a bit of code that, when run, reproduces this warning? The 'package' key should normally exist with a defined value. many thanks! On Mon, Jan 18, 2016 at 10:25 AM, wrote: > Hi, > > I see the following when calling $self->meta->add_attribute in my

Re: 'around' method modifier does not seem to work

2015-08-09 Thread Karen Etheridge
On Sat, Aug 8, 2015 at 1:18 PM, Marcos Barbeitos msbarbei...@gmail.com wrote: I get it to work. Not a very elegant solution, for I must access the attribute directly instead of using an accessor. No, instead of return $self-{sequence}; you should do return

Re: 'around' method modifier does not seem to work

2015-08-09 Thread Karen Etheridge
On Thu, Aug 6, 2015 at 4:04 PM, Marcos Barbeitos msbarbei...@gmail.com wrote: around 'sequence' = sub { my $orig = shift; my $self = shift; my $sequence = uc shift; # Do lots of things with $sequence and then return $self-$orig( $sequence );

Re: PerlMagick and Moo

2015-07-20 Thread Karen Etheridge
My question is how can you delete all the images but retain the Graphics::Magick object? I do not want to use the undef loop above. With normal perlmagick, you would say @$image = (); It's still just Perl -- how you got the image object is irrelevant. It's still a reference and you can operate

Re: overlapping attributes not detected

2014-10-04 Thread Karen Etheridge
On Sat, Oct 04, 2014 at 08:02:05PM +, John Macdonald wrote: I'd rather see it as has '-XXX' to override, has '+XXX' to augment, and has 'XXX' to create a new attribute, with an error if an unsigned creation had a conflict. That provides the feature when it is desired without providing an

Re: forced coercion

2014-08-21 Thread Karen Etheridge
On Thu, Aug 21, 2014 at 09:23:00PM +, John Macdonald wrote: So, how do I specify a type that starts with a base type, but then applies a coercion? All the examples I see of coercions have a natural base encoding, with the coercion providing a way to take some other type of value and

Re: coerce a sub-subtype

2014-06-16 Thread Karen Etheridge
On Mon, Jun 16, 2014 at 07:41:29PM +, John Macdonald wrote: In general, though, having a way of inheriting subtypes could be potentially a big saving in this sort of case. This would be a really nice feature to have in MooseX::Types - no one's made this happen yet though, sadly. (Patches

Re: Parameterized Type Intersections?

2014-05-02 Thread Karen Etheridge
I think you're suggesting being able to do appropos of: isa = Password[ length = 6, matches = qr { }, callback = sub { } ] I know this exists, which might help in implementing that: https://metacpan.org/pod/MooseX::Meta::TypeConstraint::Intersection Yep, and also

Re: Possible mis-use of Moose API or problem with coerce attribute check

2014-03-21 Thread Karen Etheridge
On Fri, Mar 21, 2014 at 12:07:48PM +, Richard Harris wrote: subtype 'A', as 'Str', where { $_ eq 'foo' }; subtype 'B', as 'Str', where { $_ =~ /some regex/ }; subtype 'C', as 'Str', where { $_ =~ /different regex/ }; subtype 'Foo', as 'A|B|C', message { 'Invalid Foo' }; has foo = (is

Re: the perl version support policy

2014-01-10 Thread Karen Etheridge
, nurtured by the false notion that democracy means that 'my ignorance is just as good as your knowledge.' - Isaac Asimov . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: [Still Failing] moose/Moose#375 (stable/2.12 - c8dcfd0)

2013-11-27 Thread Karen Etheridge
For now, I've changed the github moose organization's email to mine -- et...@cpan.org. We'll come up with a better solution soon, but you won't be spammed anymore. I'm terribly sorry about this. On Wed, Nov 27, 2013 at 07:12:49AM -0800, Ovid wrote: I have to agree. I'm going to set up a

Re: namespace Interface:: ?

2013-10-18 Thread Karen Etheridge
. ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: MooseY namespace

2013-06-10 Thread Karen Etheridge
On Mon, Jun 10, 2013 at 01:24:31PM -0500, Caleb Cushing wrote: Basically this is just a suggestion for things that don't make sense in a context outside of Moose, of course like MooseX people will probably abuse it. At least it'd be giving them a place to go, instead of just saying, you have

Re: Accessing object constructors from the 'main'

2013-06-10 Thread Karen Etheridge
On Sat, Jun 08, 2013 at 03:26:37AM -0400, Faelin McCaley Landy wrote: The Moose::Manual is very well written, but is definitely lacking in explanation of a very key step in product development: how on Earth do you actually use your objects in a script?! Like any other module, you need to load

Re: Moose::Object-equals();

2013-06-09 Thread Karen Etheridge
On Sat, Jun 08, 2013 at 05:43:28PM -0500, Caleb Cushing wrote: a while back I wrote a piece of code that was basically a generic equals method for objects. I'm wondering if I patched moose to give objects this functionality if it'd be accepted? I would lean towards providing this via an

please test Moose-2.0900-TRIAL - changes to Num behaviour

2013-05-27 Thread Karen Etheridge
will always be lucky if you know how to make friends with strange cats. - colonial American proverb . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: Short-circuit before

2013-04-29 Thread Karen Etheridge
suggestion.) -- Love is grand, divorce is a hundred grand. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: BUILD called twice.

2013-02-14 Thread Karen Etheridge
On Thu, Feb 14, 2013 at 12:05:02PM -0600, Dave Rolsky wrote: This is definitely a bug but it might be tricky to fix. Basically, method modifiers effectively copy the modified sub into the class that has the modifier. Moose then sees a BUILD in the subclass and baseclass and dutifully calls

Re: Replacing use base with use parent

2012-10-09 Thread Karen Etheridge
for the reasoning). Have you looked at the base.pm code? It needs to die as quick a death as we can bring it. -- Three out of four experts want to know who the fourth guy is. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL

Re: Version checking with MooseX::Storage::Engine

2012-09-26 Thread Karen Etheridge
On Wed, Sep 26, 2012 at 02:07:41PM -0700, Bill Moseley wrote: snipped ... But, I'm not sure it makes sense to have MooseX::Storage so restrictive. A change in versions doesn't mean incompatible serialized objects. Is that version check too agressive? Maybe the strategy used by Storable

Re: Test Failures: Foo already has a metaclass

2012-09-05 Thread Karen Etheridge
holes and resource depletion. Her teachers called it escapism. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: Wrapping builder from attribute trait?

2012-04-27 Thread Karen Etheridge
. ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

MooseX::Getopt change to --help

2012-04-15 Thread Karen Etheridge
his not understanding. - Upton Sinclair . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: provide alternate init arg for an attribute

2012-04-12 Thread Karen Etheridge
. -- It is not because things are difficult that we do not dare; it is because we do not dare that things are difficult. - Seneca . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: Pattern for configuring child objects.

2012-02-23 Thread Karen Etheridge
On Thu, Feb 23, 2012 at 12:57:26PM +0700, Bill Moseley wrote: I often have classes that abstract out the work of fetching data from multiple sources -- so I have attributes that hold instances of the objects that do the actual work. Each of these objects need their own config. I've used

Re: General Moose/Perl OO question

2012-02-09 Thread Karen Etheridge
up you get a lot of scum on the top. - Edward Abbey . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: MooseX::OmniTrigger

2011-12-22 Thread Karen Etheridge
triggers.) Can you elaborate on these bugs? -- Sometimes there is a silver bullet for boosting software engineering productivity. But you need to shoot the right person. - Craig Andera . ... . Karen Etheridge, ka...@etheridge.ca

Re: MooseX::OmniTrigger

2011-12-22 Thread Karen Etheridge
. ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: Design Pattern for Validation

2011-10-11 Thread Karen Etheridge
software engineering productivity. But you need to shoot the right person. - Craig Andera . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++

Re: Moose Type Constraints violations to warnings?

2011-06-10 Thread Karen Etheridge
On Fri, Jun 10, 2011 at 03:06:29AM -0700, Ovid wrote: When I declare a parameter as follows:     has 'some_val' = (         is  = 'rw',         isa = 'Int',     );   Later if I do $object-some_value(foobar), it blows up with a stack trace because of the type constraint violation.

Re: _can_be_made_compatible_with Errors during Build

2011-02-04 Thread Karen Etheridge
! . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: MooseX::NonMoose for Roles?

2011-01-28 Thread Karen Etheridge
itself. Perhaps can you describe an example of what you want to do? -- Historic continuity with the past is not a duty, it is only a necessity. - Oliver Wendell Holmes, Jr. . ... . Karen Etheridge, ka

Re: MooseX::NonMoose for Roles?

2011-01-28 Thread Karen Etheridge
On Fri, Jan 28, 2011 at 12:35:38PM -0800, Karen Etheridge wrote: However, if you imported functions from that class into your role, you can make them available in your role just the same as if you had implemented them into your role itself. ..However that only works for functions, not anything

Re: request for merge: replace Test::Exception with Test::Fatal

2010-10-24 Thread Karen Etheridge
On Sun, Oct 24, 2010 at 01:23:57PM -0400, Ricardo Signes wrote: The branch rfc/test-fatal completely removes any dependency on Test::Exception, and thus on Sub::Uplevel. I had originally planned to rewrite all the test files, but this quickly became too boring and overwhelming. Instead,

Re: request for merge: $type_constraint-assert_coerce

2010-10-23 Thread Karen Etheridge
$cleaned_data = MyApp::Types::TypeName-assert_coerce($crappy_user_input); ...where TypeName is declared with MooseX::Types. -- The graveyards are full of indispensible men. - Charles de Gaulle . ... . Karen Etheridge, ka...@etheridge.ca

Re: deprecating (part of) lazy_build

2010-09-30 Thread Karen Etheridge
++. Thanks for writing this up, Hans! -- A: To be or not to be. Q: What is the square-root of four b-squared? . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http

Re: Class::MOP 1.05 installation fails

2010-08-23 Thread Karen Etheridge
. ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: Class::MOP 1.05 installation fails

2010-08-23 Thread Karen Etheridge
Class::MOP 1.06 fixes this. Thanks guys! On Mon, Aug 23, 2010 at 09:23:44AM -0700, Karen Etheridge wrote: I have the same test failure. ... -- If you can talk brilliantly enough about a problem, it can create the consoling illusion that it has been mastered. - Stanley Kubrick

Re: Some documentation questions/suggestions

2010-07-30 Thread Karen Etheridge
. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: Some documentation questions/suggestions

2010-07-30 Thread Karen Etheridge
speak make more noise than ten thousand who are silent. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: Another MooseX::Runnable/MooseX::Getopt/MooseX::Configfile issue

2010-06-26 Thread Karen Etheridge
Please review branch topic/no_auto_help. On Fri, Jun 25, 2010 at 11:14:00AM -0700, Karen Etheridge wrote: SOLVED (as well as my previous post here: http://www.nntp.perl.org/group/perl.moose/2010/06/msg1675.html) Getopt::Long::Parser is being invoked with the wrong config options in MooseX

Re: Another MooseX::Runnable/MooseX::Getopt/MooseX::Configfile issue

2010-06-25 Thread Karen Etheridge
On Thu, Jun 24, 2010 at 05:41:16PM -0700, Karen Etheridge wrote: On Thu, Jun 24, 2010 at 05:22:31PM -0700, Karen Etheridge wrote: why does this work: perl run.pl Foo (prints: I lived!) but this does not: perl run.pl Foo --help Another potential clue: this also succeeds

Another MooseX::Runnable/MooseX::Getopt/MooseX::Configfile issue

2010-06-24 Thread Karen Etheridge
up in an eval block... Help? :( -- Totally mad. Utter nonsense. But we'll do it because it's brilliant nonsense. - Douglas Adams . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P

Re: Another MooseX::Runnable/MooseX::Getopt/MooseX::Configfile issue

2010-06-24 Thread Karen Etheridge
On Thu, Jun 24, 2010 at 05:22:31PM -0700, Karen Etheridge wrote: why does this work: perl run.pl Foo (prints: I lived!) but this does not: perl run.pl Foo --help Another potential clue: this also succeeds: mx-run -I. Foo --help Although new_with_options() is being invoked just

Re: Defining attributes

2010-06-22 Thread Karen Etheridge
how do I get a Lord title? Is there an application I can fill out? -- Do not engage in useless activity. - Miyamoto Musashi, Japanese Samurai, 1645 . ... . Karen Etheridge, ka...@etheridge.ca

Re: Those error messages

2010-06-11 Thread Karen Etheridge
to think the future is unwritten. - Bruce Sterling . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: (Another) Error metaclass problems with Moose 1.07

2010-06-08 Thread Karen Etheridge
poor - at least no one worth speaking of. - Douglas Adams . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Help with MooseX::Runnable, MooseX::Getopt, MooseX::SimpleConfig...

2010-06-02 Thread Karen Etheridge
. -- When I see an adult on a bicycle, I do not despair for the future of the human race. - H. G. Wells . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca

Re: Moose and object specification versions

2010-05-18 Thread Karen Etheridge
, and all the work would be done at compile time. -- Each has his past shut in him like the leaves of a book known to him by heart and his friends can only read the title. - Virginia Woolf . ... . Karen Etheridge, ka

Re: Notes about MooseX::Role::Parameterized

2010-04-22 Thread Karen Etheridge
as cleverly as possible, you are, by definition, not smart enough to debug it. - Brian W. Kernighan . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b

Re: Notes about MooseX::Role::Parameterized

2010-04-22 Thread Karen Etheridge
. ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Maybe[Foo] type coercions

2010-02-15 Thread Karen Etheridge
, plus five times eleven, equals nine squared and no more! . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b

Re: Maybe[Foo] type coercions

2010-02-15 Thread Karen Etheridge
On Mon, Feb 15, 2010 at 06:31:24PM -0600, Jesse Luehrs wrote: On Mon, Feb 15, 2010 at 04:25:54PM -0800, Karen Etheridge wrote: I'm not sure what problem you're having, since you didn't post the error message, Oops sorry, it was: Attribute (date) does not pass the type constraint because

Attribute initializers - incorrect documentation

2010-02-04 Thread Karen Etheridge
you A-flat minor. . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Re: Attribute initializers - incorrect documentation

2010-02-04 Thread Karen Etheridge
is giving to every other human being every right that you claim for yourself. - Robert G. Ingersoll . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS

Re: Attribute initializers - incorrect documentation

2010-02-04 Thread Karen Etheridge
On Thu, Feb 04, 2010 at 11:53:50AM -0800, Karen Etheridge wrote: On Thu, Feb 04, 2010 at 02:17:32PM -0500, Hans Dieter Pearcey wrote: I'm not sure whether this is a bug or not, but we've been talking about giving initializer the axe for a while. Does anyone feel motivated by this to do

Re: Attribute initializers - incorrect documentation

2010-02-04 Thread Karen Etheridge
On Thu, Feb 04, 2010 at 11:58:10AM -0800, Karen Etheridge wrote: Doh let me rephrase (of course they are different - trigger acts like an 'after' method modifier on the setter, whereas initializer acts like an 'around'). Is there anything one can do with an initializer that can't be done

Moose::Util::MetaRole parameters passed from Moose::Exporter

2010-01-22 Thread Karen Etheridge
? # class = [ 'MyApp::Meta::Class::Trait::MyTrait' ], }, ); no Moose; 1; many thanks, -- Vote Cthulhu: For when you're tired of the lesser evil . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P

Re: Moose::Util::MetaRole parameters passed from Moose::Exporter

2010-01-22 Thread Karen Etheridge
still refer to pre-0.93 class and field names, e.g. apply_metaclass_roles(), attribute_metaclass_roles, constructor_class_roles. On Fri, Jan 22, 2010 at 01:15:39PM -0800, Karen Etheridge wrote: What is missing from this simple example? snip -- Errors, like straws, upon the surface flow

Extracting the metaclass from a parameterized role

2010-01-15 Thread Karen Etheridge
tl;dr version: no questions here, just some discoveries that I wanted to spread a little farther and get google-indexed :) A while back I posted on Stack Overflow about extracting the metaclass of the currently-composing class from within the role definition:

Extracting the metaclass from a parameterized role

2010-01-15 Thread Karen Etheridge
(Apologies if this is a dupe; I've tried sending this a few times today and have been experiencing issues with my msmtp configs.) tl;dr version: no questions here, just some discoveries that I wanted to spread a little farther and get google-indexed :) A while back I posted on Stack Overflow

Re: custom trait

2010-01-13 Thread Karen Etheridge
of Moose. Correct me if I'm wrong, but I think this is the advice that was being offered earlier today, that you were taking offense to? -- The eyes of others our prisons; their thoughts our cages. - Virginia Woolf . ... . Karen Etheridge, ka

MooseX::Role::Strict + MooseX::Role::Parameterized

2010-01-04 Thread Karen Etheridge
. -- Vehemence is no guarantee of truth. - Isaac Asimov . ... . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI e++ h(-)

Bug in MooseX::Aliases with MooseX::StrictConstructor?

2009-11-27 Thread Karen Etheridge
is removed, the problem disappears. My guess is that make_immutable does not take the alias into account when inlining the constructor? -- End random acts of parenting. . ... . Karen Etheridge, ka