lib/Pod/PP/State/Info.pm untested

filter: Statementstmt 0.0% 0 / 41 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 59 CC 1 SCAR 6.9
CC
1
Cov
0%
make
2.0
replace
2.0
cmd
2.0
CRAP 2.0
1 #
2 # $Id: Info.pm,v 0.1 2001/04/25 10:41:49 ram Exp $
3 #
4 # Copyright (c) 2000-2001, Raphael Manfredi
5 #
6 # You may redistribute only under the terms of the Artistic License,
7 # as specified in the README file that comes with the distribution.
8 #
9 # HISTORY
10 # $Log: Info.pm,v $
11 # Revision 0.1 2001/04/25 10:41:49 ram
12 # Baseline for first Alpha release.
13 #
14 # $EndLog$
15 #
16  
17 use strict;
18  
19 package Pod::PP::State::Info;
20  
21 require Exporter;
22  
23 use vars qw(@ISA @EXPORT);
24 @ISA = qw(Exporter);
25  
26 use Carp::Datum;
27 use Log::Agent;
28  
29 use constant POD_PP_STATE_OK => 0; # Can read and process line
30 use constant POD_PP_STATE_ENDIF => 1; # Skip until endif
31 use constant POD_PP_STATE_ALT => 2; # Skip until alternate cond. or endif
32  
33 @EXPORT = qw(
34 POD_PP_STATE_OK
35 POD_PP_STATE_ENDIF
36 POD_PP_STATE_ALT
37 );
38  
39 #
40 # ->make
41 #
42 # Creation routine
43 #
44 sub make {
45 DFEATURE my $f_;
46 my $self = bless {}, shift;
47 my ($cmd, $state, $podinfo) = @_;
48  
49 $self->replace($cmd, $state, $podinfo);
50  
51 return DVAL $self;
52 }
53  
54 #
55 # ->replace
56 #
57 # Replace attributes.
58 #
59 sub replace {
60 DFEATURE my $f_;
61 my $self = shift;
62 my ($cmd, $state, $podinfo) = @_;
63  
64 $self->{cmd} = $cmd;
65 $self->{state} = $state;
66 $self->{podinfo} = $podinfo;
67  
68 return DVOID;
69 }
70  
71 #
72 # Attribute access
73 #
74  
75 sub cmd { $_[0]->{cmd} }
76 sub state { $_[0]->{state} }
77 sub podinfo { $_[0]->{podinfo} }
78  
79 1;
80