line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Header: /home/fergal/my/cvs/Code-Perl/lib/Code/Perl/Expr/CallSub.pm,v 1.4 2003/06/17 18:11:41 fergal Exp $ |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Code::Perl::Expr::CallSub; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base 'Code::Perl::Expr::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Class::MethodMaker ( |
10
|
1
|
|
|
|
|
7
|
get_set => [qw( -java SubName Args )] |
11
|
1
|
|
|
1
|
|
15
|
); |
|
1
|
|
|
|
|
2
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub eval |
14
|
|
|
|
|
|
|
{ |
15
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
107
|
my $subname = $self->getSubName->eval; |
18
|
2
|
|
|
|
|
73
|
my $args = $self->getArgs; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
1683
|
no strict 'refs'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
185
|
|
21
|
2
|
|
|
|
|
123
|
return &{$subname}($args->eval); |
|
2
|
|
|
|
|
27
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub perl |
25
|
|
|
|
|
|
|
{ |
26
|
2
|
|
|
2
|
0
|
6
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
77
|
my $subname = $self->getSubName; |
29
|
2
|
|
|
|
|
82
|
my $subname_perl = $subname->perl; |
30
|
2
|
|
|
|
|
151
|
my $args = $self->getArgs->perl; |
31
|
|
|
|
|
|
|
|
32
|
2
|
100
|
|
|
|
25
|
return ref($subname) eq "Code::Perl::Expr::SubName" ? |
33
|
|
|
|
|
|
|
"$subname_perl($args)" : |
34
|
|
|
|
|
|
|
"&{$subname_perl}($args)"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |