projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a559548
)
change versioning...
author
minima
<minima>
Mon, 8 Jan 2007 10:33:48 +0000
(10:33 +0000)
committer
minima
<minima>
Mon, 8 Jan 2007 10:33:48 +0000
(10:33 +0000)
perl/DXUtil.pm
patch
|
blob
|
history
diff --git
a/perl/DXUtil.pm
b/perl/DXUtil.pm
index b329f51bd7d62e1b3c2de5c4c5b6f6831153a6c1..2b308407bfe591a9fee4badf0fdc5d39db9eeb78 100644
(file)
--- a/
perl/DXUtil.pm
+++ b/
perl/DXUtil.pm
@@
-16,11
+16,6
@@
use Data::Dumper;
use strict;
use vars qw($VERSION $BRANCH);
use strict;
use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
use vars qw(@month %patmap @ISA @EXPORT);
require Exporter;
use vars qw(@month %patmap @ISA @EXPORT);
require Exporter;
@@
-30,7
+25,7
@@
require Exporter;
filecopy ptimelist
print_all_fields cltounix unpad is_callsign is_latlong
is_qra is_freq is_digits is_pctext is_pcflag insertitem deleteitem
filecopy ptimelist
print_all_fields cltounix unpad is_callsign is_latlong
is_qra is_freq is_digits is_pctext is_pcflag insertitem deleteitem
- is_prefix dd
+ is_prefix dd
dxver
);
);
@@
-440,3
+435,21
@@
sub deleteitem
@$list = grep {$_ ne $item } @$list;
return $n - @$list;
}
@$list = grep {$_ ne $item } @$list;
return $n - @$list;
}
+
+sub dxver
+{
+ my $s = shift;
+ my ($a, $b, $c, $d) = $s =~ /(\d+)\.(\d+)\.(?:(\d+)\.(\d+))?/;
+
+ my $v = sprintf( "%d.%03d", $a, $b) || 0;
+ my $br = sprintf( "%d.%03d", $c, $d) if defined $c;
+ $br ||= 0;
+
+ $main::build += $v;
+ $main::branch += $br;
+ return ($v, $br);
+}
+
+INIT {
+ ($VERSION, $BRANCH) = dxver(q$Revision$);
+}