File Coverage

blib/lib/Parse/RecDescent/Topiary/Base.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 13 13 100.0


line stmt bran cond sub pod time code
1             package Parse::RecDescent::Topiary::Base;
2 1     1   1094 use strict;
  1         2  
  1         40  
3 1     1   4 use warnings;
  1         1  
  1         152  
4              
5             our $VERSION = 0.03;
6              
7             =head1 NAME
8              
9             Parse::RecDescent::Topiary::Base - Base class for autotree constructors
10              
11             =head1 SYNOPSIS
12              
13             package MyTree::Rule1;
14             use base 'Parse::RecDescent::Topiary::Base';
15              
16             =head1 DESCRIPTION
17              
18             This module provides a method C to build hashref objects for autotree
19             classes. See L for details.
20              
21             =head2 new
22              
23             Basic hashref style object constructor. Takes a list of value pairs.
24              
25             =head1 BUGS
26              
27             Please report bugs to http://rt.cpan.org
28              
29             =head1 AUTHOR
30              
31             Ivor Williams
32             CPAN ID: IVORW
33            
34             ivorw@cpan.org
35            
36              
37             =head1 COPYRIGHT
38              
39             This program is free software; you can redistribute
40             it and/or modify it under the same terms as Perl itself.
41              
42             The full text of the license can be found in the
43             LICENSE file included with this module.
44              
45              
46             =head1 SEE ALSO
47              
48             L, L.
49              
50             =cut
51              
52             sub new {
53 21     21 1 68 my ( $pkg, %proto ) = @_;
54              
55 21         39 delete $proto{__RULE__}; #This information is already in the class name
56 21         92 bless \%proto, $pkg;
57             }
58              
59             1;
60              
61             # The preceding line will help the module return a true value
62