JPFR/Element.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 37 CC 4 SCAR 24.0
CC
4
Cov
0%
new
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 11.0
1 package XBRL::JPFR::Element;
2  
3 use strict;
4 use warnings;
5 use Carp;
6  
7 our $VERSION = '0.01';
8  
9 use base qw(XBRL::Element);
10  
11 my @fields = qw(substitutionGroup);
12 XBRL::JPFR::Element->mk_accessors(@fields);
13  
14 my %default = ();
15  
16 sub new() {
17 my ($class, $xml, $args) = @_;
18 my $self = $class->SUPER::new($xml);
19 $$self{'abstract'} = 'false' if !defined $$self{'abstract'};
20 bless $self, $class;
21 foreach (@fields) {
22 if (exists $$args{$_}) {
23 $$self{$_} = $$args{$_};
24 }
25 elsif (exists $default{$_}) {
26 $$self{$_} = $default{$_};
27 }
28 }
29  
30 return $self;
31 }
32  
33 =head1 XBRL::JPFR::Element
34  
35 XBRL::JPFR::Element - OO Module for Encapsulating XBRL::JPFR Elements
36  
37 =head1 SYNOPSIS
38  
39 use XBRL::JPFR::Element;
40  
41 my $ele = XBRL::JPFR::Element->new();
42  
43 =head1 DESCRIPTION
44  
45 This module is part of the XBRL::JPFR modules group and is intended for use with XBRL::JPFR.
46  
47 =head1 AUTHOR
48  
49 Tetsuya Yamamoto <yonjouhan@gmail.com>
50  
51 =head1 SEE ALSO
52  
53 Modules: XBRL XBRL::JPFR
54  
55 =head1 COPYRIGHT AND LICENSE
56  
57 Copyright (C) 2015 by Tetsuya Yamamoto
58  
59 This library is free software; you can redistribute it and/or modify
60 it under the same terms as Perl itself, either Perl version 5.10 or,
61 at your option, any later version of Perl 5 you may have available.
62  
63  
64 =cut
65  
66  
67  
68 1;