On 11-12-15 09:02 AM, Ken Peng wrote:
BEGIN {
my $module_dir = $INC{'Net/Evernote.pm'};
$module_dir =~ s/Evernote\.pm$//;
unshift @INC,$module_dir;
}
This begin block setup the @INC by adding a path as the module itself,
it does work.
Try this instead (no BEGIN needed):
package Net::Evernote;
use File::Basename; # must be before `use lib`
use lib dirname( $INC{ __PACKAGE__ . '.pm' } );
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
Never give up your dreams. Give up your goals, plans,
strategy, tactics, and anything that's not working but never
give up your dreams.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/