| 1 | package JavaScript::Code::Function::Result; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use vars qw[ $VERSION ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use base qw[ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | JavaScript::Code::Accessor | ||
| 7 | JavaScript::Code::Value | ||
| 8 | 2 | ]; | |
| 9 | 2 | ▶ | use JavaScript::Code::Function::Result::Element (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | use overload | ||
| 12 | 0 | ▶ | '""' => sub { shift->output }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||
| 13 | |||
| 14 | 2 | __PACKAGE__->mk_accessors(qw[ value ]); | |
| 15 | |||
| 16 | 2 | $VERSION = '0.08'; | |
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | JavaScript::Code::Function::Result - A JavaScript Function Result | ||
| 21 | |||
| 22 | =head1 METHODS | ||
| 23 | |||
| 24 | =head2 $self->output( ) | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 0 | ▶ | sub output { |
|
Subroutine
output: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | 0 | return shift->value; | |
| 30 | } | ||
| 31 | |||
| 32 | =head2 $self->as_element( ) | ||
| 33 | |||
| 34 | Returns a the result as a L<JavaScript::Code::Function::Result::Element> object. | ||
| 35 | |||
| 36 | =cut | ||
| 37 | |||
| 38 | 0 | ▶ | sub as_element { |
|
Subroutine
as_element: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 39 | 0 | my $self = shift; | |
| 40 | |||
| 41 | 0 | my $retval = JavaScript::Code::Function::Result::Element->new(); | |
| 42 | 0 | $retval->value( $self ); | |
| 43 | |||
| 44 | 0 | return $retval; | |
| 45 | } | ||
| 46 | |||
| 47 | =head1 SEE ALSO | ||
| 48 | |||
| 49 | L<JavaScript::Code> | ||
| 50 | |||
| 51 | =head1 AUTHOR | ||
| 52 | |||
| 53 | Sascha Kiefer, C<esskar@cpan.org> | ||
| 54 | |||
| 55 | =head1 LICENSE | ||
| 56 | |||
| 57 | This library is free software, you can redistribute it and/or modify it under | ||
| 58 | the same terms as Perl itself. | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | 2 | 1; | |