package Script::Singleton; use strict; use warnings; use Cwd qw(abs_path); use IPC::Shareable; our $VERSION = '0.03'; sub import { my ($class, %params) = @_; $params{glue} = abs_path((caller())[1]) if ! exists $params{glue}; IPC::Shareable->singleton($params{glue}, $params{warn}); } sub __placeholder {} 1; #### #!/usr/bin/perl use warnings; use strict; require '/home/demo/pullWorkload/scpLRSIControllerDir/toys/Singleton.pm'; use Script::Singleton; # Line 6 :: Actually run the code in "Singleton.pm" ??? package main; print "Starting script...\n"; sleep(10); print "I can use \"Singleton.pm!\".\n"; #### me@/path/to/my/scripts/$ ./runTest.perl Can't locate Script/Singleton.pm in @INC (you may need to install the Script::Singleton module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./toy02.perl line 6. BEGIN failed--compilation aborted at ./runTest.perl line 6. me@/path/to/my/scripts/$