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: $@");