Bug 1096946 - Syntax error in perl bindings Data.pm for perl 5.10.1
Summary: Syntax error in perl bindings Data.pm for perl 5.10.1
Keywords:
Status: POST
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-proton
Version: Development
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-12 18:28 UTC by Ernie
Modified: 2021-11-14 22:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Add hash reference % to keys (461 bytes, patch)
2014-05-12 18:35 UTC, Ernie
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA PROTON-602 0 None None None Never

Description Ernie 2014-05-12 18:28:24 UTC
Description of problem:
Getting a perl compilation error when running perl example client.pl

Version-Release number of selected component (if applicable):
proton-0.7

How reproducible:
100%

Steps to Reproduce:
download, build, install proton-0.7
source config.sh
cd examples/messenger/perl
./client.pl -h 

Actual results:
Type of arg 1 to keys must be hash (not private variable) at /home/eallen/proton/proton-c/bindings/perl/lib/qpid/proton/Data.pm line 1169, near "$hash) "
Compilation failed in require at /home/eallen/proton/proton-c/bindings/perl/lib/qpid_proton.pm line 25.
BEGIN failed--compilation aborted at /home/eallen/proton/proton-c/bindings/perl/lib/qpid_proton.pm line 25.
Compilation failed in require at ./client.pl line 26.
BEGIN failed--compilation aborted at ./client.pl line 26.

Expected results:
usage help text

Additional info:
not sure if this is a perl version problem, but it can be fixed in perl 5.10.1 by changing line 1169 in Data.pm
from: 
    foreach(keys $hash) {
to: 
    foreach (keys %$hash) {

Comment 1 Ernie 2014-05-12 18:35:14 UTC
Created attachment 894862 [details]
Add hash reference % to keys

This may be a version dependent fix. Not sure if it will work with all supported perl versions.

Comment 2 Justin Ross 2014-06-10 13:30:09 UTC
Ernie, does this have an associated jira?

Comment 3 Ernie 2014-06-10 15:18:05 UTC
Created PROTON-602 and added external tracker

Comment 4 Justin Ross 2014-06-12 17:04:34 UTC
https://svn.apache.org/r1601971

Comment 5 Mike McCune 2016-03-28 22:32:18 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


Note You need to log in before you can comment on or make changes to this bug.