projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make it (seem to) work under perl 5.10
[spider.git]
/
perl
/
Route.pm
diff --git
a/perl/Route.pm
b/perl/Route.pm
index abc098471e7edaf0e7a721887a778359a77b3571..868317a9646234b9093a2598048a3a795f71e8d3 100644
(file)
--- a/
perl/Route.pm
+++ b/
perl/Route.pm
@@
-181,6
+181,7
@@
sub config
{
my $self = shift;
my $nodes_only = shift || 0;
{
my $self = shift;
my $nodes_only = shift || 0;
+ my $width = shift || 79;
my $level = shift;
my $seen = shift;
my @out;
my $level = shift;
my $seen = shift;
my @out;
@@
-223,7
+224,7
@@
sub config
} else {
$c = "$ucall?";
}
} else {
$c = "$ucall?";
}
- if ((length $line) + (length $c) + 1 <
79
) {
+ if ((length $line) + (length $c) + 1 <
$width
) {
$line .= $c . ' ';
} else {
$line =~ s/\s+$//;
$line .= $c . ' ';
} else {
$line =~ s/\s+$//;
@@
-251,7
+252,7
@@
sub config
if ($nref) {
my $c = $nref->user_call;
dbg("recursing from $call -> $c") if isdbg('routec');
if ($nref) {
my $c = $nref->user_call;
dbg("recursing from $call -> $c") if isdbg('routec');
- my @rout = $nref->config($nodes_only, $level+1, $seen, @_);
+ my @rout = $nref->config($nodes_only, $
width, $
level+1, $seen, @_);
if (@rout && @_) {
push @out, ' ' x ($level*2) . $self->user_call unless grep /^\s+$call/, @out;
}
if (@rout && @_) {
push @out, ' ' x ($level*2) . $self->user_call unless grep /^\s+$call/, @out;
}