in reply to Re: use lib and use autouse 'module'
in thread use lib and use autouse 'module'
## PERL SCRIPT ## #!/usr/bin/perl; use strict; my $g_commonMount = "/common_mount"; my $g_moduleDir = "$g_commonMount/include"; sub fileWatcher { while(1) { if ( -d $g_moduleDir ) { use autouse 'foo' => qw/foo/; #using your example unshift @INC, '$g_moduleDir'; #foo.pm is under $g_moduleDir foo; } sleep (10); } } #### MAIN ### &fileWatcher; __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: use lib and use autouse 'module'
by Hue-Bond (Priest) on Jul 29, 2006 at 00:10 UTC | |
by cvg2mco (Novice) on Jul 29, 2006 at 01:12 UTC | |
by Hue-Bond (Priest) on Jul 29, 2006 at 12:48 UTC | |
by sshivell (Initiate) on Aug 22, 2006 at 17:51 UTC |