Skip Menu |

This queue is for tickets about the IPC-Lite CPAN distribution.

Report information
The Basics
Id: 51626
Status: resolved
Priority: 0/
Queue: IPC-Lite

People
Owner: EARONESTY [...] cpan.org
Requestors: vega.james [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.1.28
Fixed in: 0.4.33



Subject: import ties variable in wrong package
If a variable is tied using the "use IPC::Lite qw(...)" syntax from within a package, the variable is assigned to an incorrect package. package Foo::Bar; use IPC::Lite qw(%status); package main; print tied(%Foo::Bar::status)->path(); #fails print tied(%Foo::Bar::Foo::Bar::status)->path(); #works Attached patch fixes it.
Subject: ipc-lite.diff
--- IPC/Lite.pm +++ IPC/Lite.pm @@ -65,7 +65,7 @@ require Carp; Carp::croak("'$_' is not a valid variable name"); }); - eval("tie ${ch}${callpack}::$sym, '$pack', sym=>'$sym_n', \%opts;"); + eval("tie ${ch}$sym, '$pack', sym=>'$sym_n', \%opts;"); if ($@) { require Carp; Carp::croak("'$_' problem with tie: $@");
On Tue Nov 17 16:36:20 2009, http://jamessan.myopenid.com/ wrote: Show quoted text
> If a variable is tied using the "use IPC::Lite qw(...)" syntax from
within Show quoted text
> a package, the variable is assigned to an incorrect package. > > package Foo::Bar; > use IPC::Lite qw(%status); > package main; > print tied(%Foo::Bar::status)->path(); #fails > print tied(%Foo::Bar::Foo::Bar::status)->path(); #works > > Attached patch fixes it.
Thanks. Patched. Along with numerous bugfixes. IPC::Lite can now correctly handle mutiple nested hashes. (So you can maintain real-time persistent state of fairly complex objects. Little bit of freeze and thaw logic would make it complete.)
patch applied