diff options
Diffstat (limited to 't/pugs-objects.t')
-rw-r--r-- | t/pugs-objects.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/pugs-objects.t b/t/pugs-objects.t new file mode 100644 index 0000000..e850b34 --- /dev/null +++ b/t/pugs-objects.t @@ -0,0 +1,20 @@ +use strict; +use lib -e 't' ? 't' : 'test'; +use TestYAML tests => 2; + +{ + no warnings 'once'; + $Foo::Bar::ClassTag = '!pugs/object:Foo::Bar'; + $YAML::TagClass->{'!pugs/object:Foo::Bar'} = 'Foo::Bar'; +} + +no_diff; +run_roundtrip_nyn('dumper'); + +__DATA__ +=== Turn Perl object to Pugs object ++++ perl: bless { 'a'..'d' }, 'Foo::Bar'; ++++ yaml +--- !!pugs/object:Foo::Bar +a: b +c: d |