projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try to make the expect / send explanation even better
[spider.git]
/
perl
/
DXDupe.pm
diff --git
a/perl/DXDupe.pm
b/perl/DXDupe.pm
index 2ab0ca8cee3c81c15e677dafa8d855511186bb10..5a01bee99a6acdfa1e6e39c204e623a2d1c46ba4 100644
(file)
--- a/
perl/DXDupe.pm
+++ b/
perl/DXDupe.pm
@@
-19,6
+19,12
@@
$default = 48*24*60*60;
$lasttime = 0;
$fn = "$main::data/dupefile";
$lasttime = 0;
$fn = "$main::data/dupefile";
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
sub init
{
$dbm = tie (%d, 'DB_File', $fn) or confess "can't open dupe file: $fn ($!)";
sub init
{
$dbm = tie (%d, 'DB_File', $fn) or confess "can't open dupe file: $fn ($!)";
@@
-28,6
+34,7
@@
sub finish
{
undef $dbm;
untie %d;
{
undef $dbm;
untie %d;
+ undef %d;
}
sub check
}
sub check
@@
-73,6
+80,7
@@
sub listdups
my $regex = shift;
$regex =~ s/[\^\$\@\%]//g;
my $regex = shift;
$regex =~ s/[\^\$\@\%]//g;
+ $regex = ".*$regex" if $regex;
$regex = "^$let" . $regex;
my @out;
for (sort { $d{$a} <=> $d{$b} } grep { m{$regex}i } keys %d) {
$regex = "^$let" . $regex;
my @out;
for (sort { $d{$a} <=> $d{$b} } grep { m{$regex}i } keys %d) {