File Coverage

blib/lib/Data/Context/Loader/File/XML.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 24 24 100.0


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