diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/util.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/util.pm b/urpm/util.pm index 261bacae..cb5dbff4 100644 --- a/urpm/util.pm +++ b/urpm/util.pm @@ -5,7 +5,7 @@ package urpm::util; use strict; use Exporter; our @ISA = 'Exporter'; -our @EXPORT = qw(min quotespace unquotespace +our @EXPORT = qw(min max quotespace unquotespace remove_internal_name reduce_pathname offset_pathname untaint @@ -18,6 +18,7 @@ our @EXPORT = qw(min quotespace unquotespace (our $VERSION) = q($Revision$) =~ /(\d+)/; sub min { my $n = shift; $_ < $n and $n = $_ foreach @_; $n } +sub max { my $n = shift; $_ > $n and $n = $_ foreach @_; $n } #- quoting/unquoting a string that may be containing space chars. sub quotespace { my $x = $_[0] || ''; $x =~ s/(\s)/\\$1/g; $x } |