| 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; |