[system] / trunk / pg / lib / Parser / List / Matrix.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser/List/Matrix.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5000 Revision 5001
50# 50#
51# Recursively handle the rows, but only enclose in brackets 51# Recursively handle the rows, but only enclose in brackets
52# to form reference to array of (references to arrays of ...) entries 52# to form reference to array of (references to arrays of ...) entries
53# 53#
54sub perl { 54sub perl {
55 my $self = shift; my $context = $self->context;
56 my $parens = shift; my $matrix = shift; 55 my $self = shift; my $parens = shift; my $matrix = shift;
57 my $perl; my @p = (); 56 my $perl; my @p = ();
58 foreach my $x (@{$self->{coords}}) {push(@p,$x->perl(0,1))} 57 foreach my $x (@{$self->{coords}}) {push(@p,$x->perl(0,1))}
59 if ($matrix) { 58 if ($matrix) {
60 $perl = '['.join(',',@p).']'; 59 $perl = '['.join(',',@p).']';
61 } else { 60 } else {
62 $perl = Value->Package($self->type,$context).'->new('.join(',',@p).')'; 61 $perl = $self->Package($self->type).'->new('.join(',',@p).')';
63 $perl = '('.$perl.')' if $parens; 62 $perl = '('.$perl.')' if $parens;
64 } 63 }
65 return $perl; 64 return $perl;
66} 65}
67 66

Legend:
Removed from v.5000  
changed lines
  Added in v.5001

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9