r35158 - /trunk/dh-make-perl/lib/Debian/Dependency.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Mon May 11 10:20:18 UTC 2009
Author: dmn
Date: Mon May 11 10:20:08 2009
New Revision: 35158
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35158
Log:
Dependency::set: ignore zero versions
Modified:
trunk/dh-make-perl/lib/Debian/Dependency.pm
Modified: trunk/dh-make-perl/lib/Debian/Dependency.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/Dependency.pm?rev=35158&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/Dependency.pm (original)
+++ trunk/dh-make-perl/lib/Debian/Dependency.pm Mon May 11 10:20:08 2009
@@ -131,6 +131,24 @@
# same versions, compare relations
return $rel_order{ $left->rel } <=> $rel_order{ $right->rel };
+}
+
+=item set
+
+Overrides the set method from L<Class::Accessor>. Used to convert zero versions
+(for example I<0> or I<0.000>) to void versions.
+
+=cut
+
+sub set {
+ my( $self, $field, $value ) = @_;
+
+ undef($value)
+ if $field eq 'ver'
+ and defined($value)
+ and $value =~ /^0[0.]*$/;
+
+ $self->SUPER::set( $field, $value );
}
=item parse()
More information about the Pkg-perl-cvs-commits
mailing list