in reply to File::MMagic Woes
Question: since $dataLoc is a package-scope variable and will only be initialized once, would this cause problems when forked?use vars qw( $dataLoc ); sub new{ $dataLoc = $fh->tell() if (! defined $dataLoc); }
I wrote some quick and dirty sample code which does, indeed go wrong if I use File::MMagic. I assume Anonymous Monk is using use. If I require File::MMagic after the fork, it seems to work fine.
So, question to Monks-more-experienced-than-I: What happens to package variables when you fork?
Russ
Brainbench 'Most Valuable Professional' for Perl
|
|---|