line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: /mirror/coderepos/lang/perl/R-Writer/trunk/lib/R/Writer/Call.pm 43085 2008-03-01T12:28:42.888222Z daisuke $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2008 Daisuke Maki |
4
|
|
|
|
|
|
|
# all rights reserved. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package R::Writer::Call; |
7
|
6
|
|
|
6
|
|
36
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
202
|
|
8
|
6
|
|
|
6
|
|
37
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
209
|
|
9
|
6
|
|
|
6
|
|
36
|
use base qw(Class::Accessor::Fast); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
4745
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors($_) for qw(call args delimiter end_of_call_chain); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
3
|
|
|
3
|
1
|
7
|
my $class = shift; |
16
|
3
|
|
|
|
|
15
|
my %args = @_; |
17
|
3
|
|
|
|
|
27
|
$class->SUPER::new({ @_ }); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub as_string |
21
|
|
|
|
|
|
|
{ |
22
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
23
|
0
|
|
|
|
|
|
my $c = shift; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $f = $self->call; |
26
|
0
|
|
|
|
|
|
my $args = $self->args; |
27
|
0
|
|
|
|
|
|
return ($self->{object} ? "$self->{object}." : "" ) . |
28
|
|
|
|
|
|
|
"$f(" . |
29
|
|
|
|
|
|
|
join(",", |
30
|
|
|
|
|
|
|
map { |
31
|
0
|
0
|
|
|
|
|
$c->__obj_as_string( $_ ); |
32
|
|
|
|
|
|
|
} @$args |
33
|
|
|
|
|
|
|
) . ")" |
34
|
|
|
|
|
|
|
; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |