File: YAML.pm

package info (click to toggle)
libhtml-template-dumper-perl 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 196 kB
  • ctags: 39
  • sloc: perl: 247; makefile: 7
file content (49 lines) | stat: -rw-r--r-- 792 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
=head1 NAME

HTML::Template::Dumper::YAML - Output template data using YAML

=head1 COPYRIGHT

Copyright 2003, American Society of Agronomy. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of either:

a) the GNU General Public License as published by the Free Software 
Foundation; either version 2, or (at your option) any later version, or

b) the "Artistic License" which comes with Perl.

=cut


package HTML::Template::Dumper::YAML;
use strict;
use warnings;
use YAML;
use base 'HTML::Template::Dumper::Format';

our $VERSION = 0.1;


sub dump 
{
	my $self = shift; 
	my $ref  = shift || return;

	return Dump( $ref );
}

sub parse 
{
	my $self = shift;
	my $data = shift || return;
	
	return Load( $data );
}


1;
__END__