llancet has asked for the wisdom of the Perl Monks concerning the following question:
It seems that the "keys" system do not affect Moose object at all...#!/usr/bin/perl use strict; use YAML qw/Dump Bless/; use YAML::Node; { package Foo; use Moose; has foo => ( is => 'rw', isa => 'Any' ); has bar => ( is => 'rw', isa => 'Any' ); } my $foo = Foo->new( foo => 'fooValue', bar => 'barValue' ); Bless($foo)->keys(['foo']); print "##### Moose obj #####\n"; print Dump $foo; my $bar = { foo => 'fooValue', bar => 'barValue' }; Bless($bar)->keys(['foo']); print "##### hashref #####\n"; print Dump $bar;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose and YAML
by CountZero (Bishop) on Apr 26, 2010 at 18:30 UTC | |
by llancet (Friar) on Apr 27, 2010 at 00:43 UTC | |
by CountZero (Bishop) on Apr 27, 2010 at 06:08 UTC | |
by llancet (Friar) on Apr 28, 2010 at 05:43 UTC | |
by Anonymous Monk on Apr 28, 2010 at 06:30 UTC | |
|