line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Context::Loader::File::YAML; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2013-10-29 17:34:27 |
4
|
|
|
|
|
|
|
# Create by: Ivan Wills |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
1883
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
17
|
|
10
|
2
|
|
|
2
|
|
11138
|
use version; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
21
|
|
11
|
2
|
|
|
2
|
|
251
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
175
|
|
12
|
2
|
|
|
2
|
|
9
|
use Data::Dumper qw/Dumper/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
13
|
2
|
|
|
2
|
|
10
|
use English qw/ -no_match_vars /; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = version->new('0.1.10'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
extends 'Data::Context::Loader::File'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has '+module' => ( |
20
|
|
|
|
|
|
|
default => 'YAML::XS', |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub loader { |
24
|
1
|
|
|
1
|
1
|
2763886
|
my ($self, $file) = @_; |
25
|
1
|
|
|
|
|
103
|
return YAML::XS::Load($file); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Data::Context::Loader::File::YAML - <One-line description of module's purpose> |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This documentation refers to Data::Context::Loader::File::YAML version 0.1.10 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SYNOPSIS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
use Data::Context::Loader::File::YAML; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Brief but working code example(s) here showing the most common usage(s) |
45
|
|
|
|
|
|
|
# This section will be as far as many users bother reading, so make it as |
46
|
|
|
|
|
|
|
# educational and exemplary as possible. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 C<loader ($file)> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Loads the file as YAML |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
There are no known bugs in this module. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Patches are welcome. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
79
|
|
|
|
|
|
|
All rights reserved. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
82
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
83
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
84
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
85
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |