Code/Expression/Op/Term.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 33 CC 2 SCAR 11.5
CC
2
Cov
0%
new
6.0
precedence
2.0
output
2.0
CRAP 3.1
1 package JavaScript::Code::Expression::Op::Term;
2
3 use strict;
4 use vars qw[ $VERSION ];
5 use base qw[ JavaScript::Code::Expression::Op ];
6
7 $VERSION = '0.03';
8
9 =head1 NAME
10
11 JavaScript::Code::Expression::Op::Term
12
13 =head1 METHODS
14
15 =head2 new
16
17 =cut
18
19 sub new {
20 my $obj = shift;
21 my $class = ref $obj || $obj;
22
23 die("'$class' takes excatly 1 operand.")
24 unless @_ == 1;
25
26 return bless [@_], $class;
27 }
28
29 =head2 $self->precedence( )
30
31 =cut
32
33 sub precedence { return 1000; }
34
35 =head2 $self->output( )
36
37 =cut
38
39 sub output { return shift->[0]; }
40
41 =head1 SEE ALSO
42
43 L<JavaScript::Code>
44
45 =head1 AUTHOR
46
47 Sascha Kiefer, C<esskar@cpan.org>
48
49 =head1 LICENSE
50
51 This library is free software, you can redistribute it and/or modify it under
52 the same terms as Perl itself.
53
54 =cut
55
56 1;