From 08152b0d8dc9ac58192b23a74bc3d2f84ea0508c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 16 Mar 2012 20:11:43 +0000 Subject: (property2name,property2name_range,property2name_op_version) enable perl_checker to see how many arguments are expected --- URPM/Resolve.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 2ff98a0..40e32a0 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -23,13 +23,18 @@ sub find(&@) { #- property2name* functions below parse things like "mageia-release[>= 1]" #- which is the format returned by URPM.xs for ->requires, ->provides, ->conflicts... sub property2name { - $_[0] =~ /^([^\s\[]*)/ && $1; + my ($property) = @_; + $property =~ /^([^\s\[]*)/ && $1; } + sub property2name_range { - $_[0] =~ /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/; + my ($property) = @_; + $property =~ /^([^\s\[]*)(?:\[\*\])?\[?([^\s\]]*\s*[^\s\]]*)/; } + sub property2name_op_version { - $_[0] =~ /^([^\s\[]*)(?:\[\*\])?\s*\[?([^\s\]]*)\s*([^\s\]]*)/; + my ($property) = @_; + $property =~ /^([^\s\[]*)(?:\[\*\])?\s*\[?([^\s\]]*)\s*([^\s\]]*)/; } #- wrappers around $state (cf "The $state object" in "perldoc URPM") -- cgit v1.2.1