| 1 | package JavaScript::Code::Value; | ||
| 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[ Clone ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use JavaScript::Code::Variable (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | $VERSION = '0.08'; | |
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | JavaScript::Code::Value - A JavaScript Value | ||
| 13 | |||
| 14 | =head2 SYNOPSIS | ||
| 15 | |||
| 16 | use base qw[ JavaScript::Code::Value ]; | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | A value can e.g. be assigned to a variable. | ||
| 21 | |||
| 22 | =head1 METHODS | ||
| 23 | |||
| 24 | =head2 $self->can_be_assigned( ) | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 0 | ▶ | sub can_be_assigned { return 1; } |
|
Subroutine
can_be_assigned: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | |||
| 30 | =head2 $self->as_variable( ... ) | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | |||
| 35 | 0 | ▶ | sub as_variable { |
|
Subroutine
as_variable: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 36 | 0 | my $self = shift; | |
| 37 | 0 | my $args = $self->args(@_); | |
| 38 | |||
| 39 | return JavaScript::Code::Variable->new( | ||
| 40 | name => $args->{name}, | ||
| 41 | 0 | value => $self | |
| 42 | ); | ||
| 43 | } | ||
| 44 | |||
| 45 | =head1 SEE ALSO | ||
| 46 | |||
| 47 | L<JavaScript::Code>, L<JavaScript::Code::Variable> | ||
| 48 | |||
| 49 | =head1 AUTHOR | ||
| 50 | |||
| 51 | Sascha Kiefer, C<esskar@cpan.org> | ||
| 52 | |||
| 53 | =head1 LICENSE | ||
| 54 | |||
| 55 | This library is free software, you can redistribute it and/or modify it under | ||
| 56 | the same terms as Perl itself. | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 2 | 1; | |