projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a line to bump the build no up
[spider.git]
/
perl
/
DXUtil.pm
diff --git
a/perl/DXUtil.pm
b/perl/DXUtil.pm
index 7067c359d54892bbf7c935fc6fa67ecd43f107de..be6dfb4d308e2152e158000a9ddb41582bcc02df 100644
(file)
--- a/
perl/DXUtil.pm
+++ b/
perl/DXUtil.pm
@@
-222,7
+222,7
@@
sub phash
my $ref = shift;
my $out;
my $ref = shift;
my $out;
-
while (my $k =
sort keys %$ref) {
+
foreach my $k (
sort keys %$ref) {
$out .= "${k}=>$ref->{$k}, ";
}
$out =~ s/, $// if $out;
$out .= "${k}=>$ref->{$k}, ";
}
$out =~ s/, $// if $out;
@@
-565,8
+565,11
@@
sub difft
}
}
return '-(ve)' if $t < 0;
}
}
return '-(ve)' if $t < 0;
- my ($d,$h,$m,$s);
+ my ($
y,$
d,$h,$m,$s);
my $out = '';
my $out = '';
+ $y = int $t / (86400*365);
+ $out .= sprintf ("%s${y}y", $adds?' ':'') if $y;
+ $t -= $y * 86400 * 365;
$d = int $t / 86400;
$out .= sprintf ("%s${d}d", $adds?' ':'') if $d;
$t -= $d * 86400;
$d = int $t / 86400;
$out .= sprintf ("%s${d}d", $adds?' ':'') if $d;
$t -= $d * 86400;
@@
-599,13
+602,13
@@
sub parraydifft
sub basecall
{
sub basecall
{
- my ($r) = $_[0] =~ m{^((?:[\w\d]+/)?[\w\d]+(?:/[\w\d]+)
?
)(?:-\d+)?(?:-\#)?$};
+ my ($r) = $_[0] =~ m{^((?:[\w\d]+/)?[\w\d]+(?:/[\w\d]+)
*
)(?:-\d+)?(?:-\#)?$};
return $r;
}
sub normalise_call
{
return $r;
}
sub normalise_call
{
- my ($c, $ssid) = $_[0] =~ m|^((?:[\w\d]+/)?[\d\w]+(?:/[\w\d]+)
?
)(?:-(\d+))?(?:-\#)?$|;
+ my ($c, $ssid) = $_[0] =~ m|^((?:[\w\d]+/)?[\d\w]+(?:/[\w\d]+)
*
)(?:-(\d+))?(?:-\#)?$|;
my $ncall = $c;
$ssid += 0;
$ncall .= "-$ssid" if $ssid;
my $ncall = $c;
$ssid += 0;
$ncall .= "-$ssid" if $ssid;