Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Enumerating all attributes of a Moo object

by zwon (Monsignor)
on Jul 09, 2013 at 16:51 UTC ( #1043353=note: print w/ replies, xml ) Need Help??


in reply to Re: Enumerating all attributes of a Moo object
in thread Enumerating all attributes of a Moo object

Note, that this will not show attributes that are not set:

use 5.010; use strict; use warnings; { package Foo; use Moose; has bar => ( is => 'rw' ); has baz => ( is => 'rw' ); } my $foo = Foo->new( bar => 1 ); say join "\n", keys %$foo; __END__ bar


Comment on Re^2: Enumerating all attributes of a Moo object
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-07-29 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls