line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JavaScript::Code::String;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
9
|
use strict;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
51
|
|
4
|
2
|
|
|
2
|
|
8
|
use vars qw[ $VERSION ];
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
411
|
|
5
|
2
|
|
|
2
|
|
9
|
use base qw[ JavaScript::Code::Type ];
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
347
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.08';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
JavaScript::Code::String - A JavaScript String Type
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#!/usr/bin/perl
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use strict;
|
18
|
|
|
|
|
|
|
use warnings;
|
19
|
|
|
|
|
|
|
use JavaScript::Code::String;
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $string = JavaScript::Code::String->new()->value("Go for it!");
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print $string->output;
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 METHODS
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
See also the L documentation.
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 $self->type( )
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub type {
|
34
|
0
|
|
|
0
|
1
|
0
|
return 'String';
|
35
|
|
|
|
|
|
|
}
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 $self->output( )
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub output {
|
42
|
2
|
|
|
2
|
1
|
2
|
my ($self) = @_;
|
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
9
|
my $value = $self->value;
|
45
|
2
|
|
|
|
|
318
|
$value =~ s{\"}{\\\"}g;
|
46
|
|
|
|
|
|
|
|
47
|
2
|
|
|
|
|
6
|
return qq~"$value"~;
|
48
|
|
|
|
|
|
|
}
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SEE ALSO
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Sascha Kiefer, C
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 LICENSE
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under
|
61
|
|
|
|
|
|
|
the same terms as Perl itself.
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1;
|