summaryrefslogtreecommitdiff
path: root/t/pugs-objects.t
blob: e850b34206548632fa699e205f264b2154100c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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