## 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__
In reply to Re^2: use lib and use autouse 'module'
by cvg2mco
in thread use lib and use autouse 'module'
by cvg2mco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |