[pve-devel] [PATCH] remove superfluous substitution

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jun 5 11:23:11 CEST 2015


regexps are greedy so the first substitution eats up
multiple groups of double-colons up to the last one already.
So unless there's some intended hidden side effect this
statement has no obvious purpose.
---
 src/PVE/RESTHandler.pm | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
index 4153192..ad0f929 100644
--- a/src/PVE/RESTHandler.pm
+++ b/src/PVE/RESTHandler.pm
@@ -275,8 +275,6 @@ sub AUTOLOAD {
     my $sub = $AUTOLOAD;
     (my $method = $sub) =~ s/.*:://;
 
-    $method =~ s/.*:://;
-
     my $info = $this->map_method_by_name($method);
 
     *{$sub} = sub {
-- 
2.1.4





More information about the pve-devel mailing list