1 package YAML::Marshall;
2 use strict; use warnings;
9 unless (grep { $_ eq $class} @{$package . '::ISA'}) {
10 push @{$package . '::ISA'}, $class;
16 $YAML::TagClass->{$tag} = $package;
17 ${$package . "::YamlTag"} = $tag;
24 my $tag = ${ref($self) . "::YamlTag"} || 'perl/' . ref($self);
25 $self->yaml_node($self, $tag);
29 my ($class, $node) = @_;
30 if (my $ynode = $class->yaml_ynode($node)) {
31 $node = $ynode->{NODE};
43 YAML::Node::ynode(@_);
52 YAML::Marshall - YAML marshalling class you can mixin to your classes
58 use YAML::Marshall -mixin;
62 For classes that want to handle their own YAML serialization.
66 Ingy döt Net <ingy@cpan.org>
70 Copyright (c) 2006. Ingy döt Net. All rights reserved.
72 This program is free software; you can redistribute it and/or modify it
73 under the same terms as Perl itself.
75 See L<http://www.perl.com/perl/misc/Artistic.html>