r28072 - /trunk/dh-make-perl/lib/Debian/Dependency.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Thu Dec 11 14:27:37 UTC 2008
Author: dmn
Date: Thu Dec 11 14:27:34 2008
New Revision: 28072
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28072
Log:
tidy Debian::Dependency
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=28072&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/Dependency.pm (original)
+++ trunk/dh-make-perl/lib/Debian/Dependency.pm Thu Dec 11 14:27:34 2008
@@ -32,8 +32,7 @@
use base qw(Class::Accessor);
__PACKAGE__->mk_accessors(qw( pkg ver rel ));
-use overload
- '""' => \&_stringify;
+use overload '""' => \&_stringify;
=head2 CLASS_METHODS
@@ -78,7 +77,7 @@
my $self = shift;
return (
- $self->ver
+ $self->ver
? $self->pkg . ' (' . $self->rel . ' ' . $self->ver . ')'
: $self->pkg
);
@@ -105,7 +104,7 @@
sub parse {
my ( $class, $str ) = @_;
- if ( $str =~ m{
+ if ($str =~ m{
^ # start from the beginning
([^\(\s]+) # package name - no paren, no space
\s* # oprional space
@@ -122,23 +121,23 @@
(.+) # version
\) # closing paren
)?
- $}x # done
- )
+ $}x # done
+ )
{
- return $class->new( {
- pkg => $1,
- ( ( defined($2) and defined($3) )
- ? ( rel => $2, ver => $3 )
- : ()
- )
- } );
+ return $class->new(
+ { pkg => $1,
+ ( ( defined($2) and defined($3) )
+ ? ( rel => $2, ver => $3 )
+ : ()
+ )
+ }
+ );
}
else {
die "Unable to parse '$str'";
}
}
-
1;
=back
More information about the Pkg-perl-cvs-commits
mailing list