Subject: | Bug in POE::Component::Fuse::SubProcess? |
Date: | Sun, 02 Jun 2019 15:02:12 -0400 |
To: | bug-POE-Component-Fuse [...] rt.cpan.org |
From: | Scott Murawski <scottm [...] intellasoft.net> |
Hi,
When we upgraded to perl 5.24, we had this file causing some trouble
x64-perl5.24/perl/lib/perl5/x86_64-linux-gnu-thread-multi/POE/Component/Fuse/SubProcess.pm
Line 87
eval "sub callback_$cb { return fuse_callback( \$cb, \@_ ) }"; ## no
critic ( ProhibitStringyEval )
I don't have the exact error anymore but it was complaining that $cb was
no longer available inside the eval. After poking around it looked like
fuse_callback only required a string, so I changed that line to:
eval "sub callback_$cb { return fuse_callback( '$cb', \@_ ) }"; ## no
critic ( ProhibitStringyEval )
The loop is here and $cb is just a quoted string. Once the string $cb
was being passed in, everything was working:
foreach my $cb ( qw( getattr readlink getdir mknod mkdir unlink
rmdir symlink rename link chmod
chown truncate utime open read write statfs flush
release fsync
setxattr getxattr listxattr removexattr ) ) {
$callbacks{ $cb } =
"POE::Component::Fuse::SubProcess::callback_" . $cb;
# create the sub!
eval "sub callback_$cb { return fuse_callback( '$cb',
\@_ ) }"; ## no critic ( ProhibitStringyEval )
if ( $@ ) {
die $@;
}
}
Thanks!
Scott
--
Scott Murawski
intellaSoft, LLC
Web: www.intellaSoft.net