line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JavaScript::Code::Accessor;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
19
|
use strict;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
63
|
|
4
|
2
|
|
|
2
|
|
9
|
use vars qw[ $VERSION ];
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
62
|
|
5
|
2
|
|
|
2
|
|
10
|
use base qw[ Class::Accessor::Chained::Fast ];
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1768
|
|
6
|
2
|
|
|
2
|
|
8854
|
use Carp ();
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
26
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
18
|
use Scalar::Util ();
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
280
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.08';
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
JavaScript::Code::Accessor - A Accessor Class
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head2 SYNOPSIS
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use base qw[ JavaScript::Code::Accessor ];
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 DESCRIPTION
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Accessor Class
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHDOS
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 JavaScript::Code::Accessor->new( %args | \%args )
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Takes a hash or a hashref as initialization arguments.
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new {
|
33
|
5
|
|
|
5
|
1
|
9
|
my $obj = shift;
|
34
|
5
|
|
33
|
|
|
19
|
my $class = ref $obj || $obj;
|
35
|
|
|
|
|
|
|
|
36
|
5
|
|
|
|
|
33
|
return $class->SUPER::new( $class->__args(@_) );
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub __args {
|
40
|
5
|
|
|
5
|
|
7
|
my $self = shift;
|
41
|
|
|
|
|
|
|
|
42
|
5
|
100
|
|
|
|
33
|
return {} unless @_;
|
43
|
|
|
|
|
|
|
|
44
|
2
|
50
|
50
|
|
|
12
|
my $ref = @_ ? Scalar::Util::reftype( $_[0] ) || '' : '';
|
45
|
2
|
|
|
|
|
8
|
my %args =
|
46
|
|
|
|
|
|
|
$ref eq 'HASH'
|
47
|
2
|
50
|
|
|
|
5
|
? %{ shift() }
|
48
|
|
|
|
|
|
|
: @_;
|
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
|
|
11
|
return \%args;
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L, L
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Sascha Kiefer, C
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 LICENSE
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under
|
64
|
|
|
|
|
|
|
the same terms as Perl itself.
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1;
|