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   10101 use strict;
  9         13  
  9         329  
16 9     9   43 use Carp;
  9         14  
  9         590  
17 9     9   732 use Hash::AutoHash;
  9         38790  
  9         48  
18 9     9   979 use base qw(Hash::AutoHash::Args);
  9         14  
  9         2406  
19             our $VERSION='1.18_01';
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   57 no strict 'refs';
  9         12  
  9         2215  
32 5     5 1 11156 sub get_args { &{$helper_class.'::get_args'} }
  5         44  
33 3     3 1 9915 sub getall_args { &{$helper_class.'::getall_args'} }
  3         28  
34 2     2 1 11557 sub set_args { &{$helper_class.'::set_args'} }
  2         22  
35 1     1 1 11 sub fix_args { &{$helper_class.'::fix_args'} }
  1         9  
36             *_fix_args=\&fix_args;
37 1     1 1 11546 sub fix_keyword { &{$helper_class.'::fix_keyword'} }
  1         9  
38 1     1 1 847 sub fix_keywords { &{$helper_class.'::fix_keywords'} }
  1         7  
39 2     2 1 839 sub is_keyword { &{$helper_class.'::is_keyword'} }
  2         9  
40 2     2 1 3 sub is_positional { &{$helper_class.'::is_positional'} }
  2         10  
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   977 use strict;
  9         26  
  9         371  
50             BEGIN {
51 9     9   440 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__