Skip Menu |

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 117675
Status: resolved
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: me [...] eboxr.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.070



Subject: Fix prototype errors while lazy loading the module
Sorry if I'm resubmitting this ticket, but cannot find it in the history and do not know if I forgot to submit it upstream or not. This is a problem with perl522 when doing some lazy loading of the module, where a syntax error will occur as the prototype for _unmatched and _retError are not defined. Simply avoid to define prototypes and use parens when required.
Subject: 0001-Fix-prototype-errors-while-lazy-loading-the-module.patch
From 75e216b34ad8125dc4646c28756ff3b2042c30c0 Mon Sep 17 00:00:00 2001 From: Nicolas Rochelemagne <rochelemagne@cpanel.net> Date: Wed, 20 Jan 2016 16:05:54 -0600 Subject: [PATCH] Fix prototype errors while lazy loading the module This is a problem with perl522 when doing some lazy loading of the module, where a syntax error will occur as the prototype for _unmatched and _retError are not defined. Simply avoid to define prototypes and use parens when required. diff --git a/lib/File/GlobMapper.pm b/lib/File/GlobMapper.pm index 76d4bed..a96cf3e 100644 --- a/lib/File/GlobMapper.pm +++ b/lib/File/GlobMapper.pm @@ -149,7 +149,7 @@ sub _parseBit if ($2 eq ',') { - return _unmatched "(" + return _unmatched("(") if $depth ; $out .= '|'; @@ -160,7 +160,7 @@ sub _parseBit } elsif ($2 eq ')') { - return _unmatched ")" + return _unmatched(")") if ! $depth ; -- $depth ; @@ -170,22 +170,22 @@ sub _parseBit # TODO -- quotemeta & check no '/' # TODO -- check for \] & other \ within the [] $string =~ s#(.*?\])## - or return _unmatched "[" ; + or return _unmatched("["); $out .= "$1)" ; } elsif ($2 eq ']') { - return _unmatched "]" ; + return _unmatched("]"); } elsif ($2 eq '{' || $2 eq '}') { - return _retError "Nested {} not allowed" ; + return _retError("Nested {} not allowed"); } } $out .= quotemeta $string; - return _unmatched "(" + return _unmatched("(") if $depth ; return $out ; @@ -219,7 +219,7 @@ sub _parseInputGlob } elsif ($2 eq ')') { - return _unmatched ")" + return _unmatched(")") if ! $depth ; -- $depth ; @@ -229,16 +229,16 @@ sub _parseInputGlob # TODO -- quotemeta & check no '/' or '(' or ')' # TODO -- check for \] & other \ within the [] $string =~ s#(.*?\])## - or return _unmatched "["; + or return _unmatched("["); $out .= "$1)" ; } elsif ($2 eq ']') { - return _unmatched "]" ; + return _unmatched("]"); } elsif ($2 eq '}') { - return _unmatched "}" ; + return _unmatched("}"); } elsif ($2 eq '{') { @@ -248,7 +248,7 @@ sub _parseInputGlob my $tmp ; unless ( $string =~ s/(.*?)$noPreBS\}//) { - return _unmatched "{"; + return _unmatched("{"); } #$string =~ s#(.*?)\}##; @@ -263,7 +263,7 @@ sub _parseInputGlob } } - return _unmatched "(" + return _unmatched("(") if $depth ; $out .= quotemeta $string ; -- 2.10.0
On Thu Sep 08 19:17:34 2016, atoomic wrote: Show quoted text
> Sorry if I'm resubmitting this ticket, but cannot find it in the > history and do not know if I forgot to submit it upstream or not. > > This is a problem with perl522 when doing some lazy loading > of the module, where a syntax error will occur as the prototype for > _unmatched and _retError are not defined. > > Simply avoid to define prototypes and use parens when required.
Commit is also accessible online at https://github.com/atoomic/IO-Compress/commit/7dacc7007ae8f46d66e1e06c5623d58d5c046d9c
No, haven't seen that patch before. Applied to my development copy. cheers Paul