File Coverage

blib/lib/Hash/AutoHash/Args/V0.pm
Criterion Covered Total %
statement 35 35 100.0
branch n/a
condition n/a
subroutine 15 15 100.0
pod 8 8 100.0
total 58 58 100.0


line stmt bran cond sub pod time code
1             package Hash::AutoHash::Args::V0;
2             #################################################################################
3             #
4             # Author: Nat Goodman
5             # Created: 09-03-05
6             # $Id:
7             #
8             # Simplifies processing of keyward argument lists.
9             # Replaces Class::AutoClass::Args using Class::AutoClass:Hash and tied hash to
10             # provide cleaner, more powerful interface.
11             # Completely compatible with Class::AutoClass::Args.
12             # Use Hash::AutoHash::Args if compatibility with Class::AutoClass::Args NOT needed
13             #
14             #################################################################################
15 9     9   8638 use strict;
  9         14  
  9         291  
16 9     9   44 use Carp;
  9         12  
  9         499  
17 9     9   1131 use Hash::AutoHash;
  9         9096  
  9         45  
18 9     9   732 use base qw(Hash::AutoHash::Args);
  9         12  
  9         2257  
19             our $VERSION='1.18';
20              
21             our @NORMAL_EXPORT_OK=@Hash::AutoHash::Args::EXPORT_OK;
22             my $helper_class=__PACKAGE__.'::helper';
23             our @EXPORT_OK=$helper_class->EXPORT_OK;
24             our @SUBCLASS_EXPORT_OK=$helper_class->SUBCLASS_EXPORT_OK;
25              
26             ################################################################################
27             # methods needed for compatibility with Class::AutoClass::Args
28             # implementations live in Hash::AutoHash::Args::helper
29             ################################################################################
30             my $helper_class='Hash::AutoHash::Args::helper';
31 9     9   53 no strict 'refs';
  9         16  
  9         2522  
32 5     5 1 15874 sub get_args { &{$helper_class.'::get_args'} }
  5         33  
33 3     3 1 13405 sub getall_args { &{$helper_class.'::getall_args'} }
  3         22  
34 2     2 1 11851 sub set_args { &{$helper_class.'::set_args'} }
  2         19  
35 1     1 1 16 sub fix_args { &{$helper_class.'::fix_args'} }
  1         14  
36             *_fix_args=\&fix_args;
37 1     1 1 22398 sub fix_keyword { &{$helper_class.'::fix_keyword'} }
  1         13  
38 1     1 1 1499 sub fix_keywords { &{$helper_class.'::fix_keywords'} }
  1         10  
39 2     2 1 1421 sub is_keyword { &{$helper_class.'::is_keyword'} }
  2         13  
40 2     2 1 5 sub is_positional { &{$helper_class.'::is_positional'} }
  2         13  
41              
42             #################################################################################
43             # helper package exists to avoid polluting Hash::AutoHash::Args namespace with
44             # subs that would mask accessor/mutator AUTOLOADs
45             # needed here to get EXPORT_OK, SUBCLASS_EXPORT_OK, import methods from base helper
46             #################################################################################
47             package Hash::AutoHash::Args::V0::helper;
48             our $VERSION=$Hash::AutoHash::Args::V0::VERSION;
49 9     9   51 use strict;
  9         21  
  9         383  
50             BEGIN {
51 9     9   468 our @ISA=qw(Hash::AutoHash::Args::helper);
52             }
53              
54             package Hash::AutoHash::Args::V0; # so CPAN will connect POD to main class
55              
56             1;
57              
58             __END__