in reply to Re: Moose attribute predicate alternative
in thread Moose attribute predicate alternative

Or even:

$attr{$_} = $self->$_ if $self->${\"has_$_"} for qw/x y w h/;
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^3: Moose attribute predicate alternative
by hdb (Monsignor) on Jul 04, 2013 at 14:46 UTC
      ++$a and print $a for qw/ x y y y /;