The said packages are located in/home/UTKU/devel/my_script
Now the script tries following:/home/UTKU/devel/my_script/dir_one/my_package.pm /home/UTKU/devel/my_script/dir_two/my_package.pm
Perl interpreter says me that my_hash is used only once, ie. it seems that the package has not been bound:#!/usr/bin/perl -w BEGIN { push @INC, "/home/UTKU/devel/my_script" } use Data::Dumper; use dir_two::my_package; print Dumper(\%my_hash);
I know, interpreter takes the current directory into @INC but it also does not work. Can't I define packages with relative paths? The content of the package in /home/UTKU/devel/my_script/dir_two/my_package.pm is like in my first posting:$ ./my_script.pl Name "main::my_hash" used only once: possible typo at ./my_script.pl l +ine 9. $VAR1 = {};
Is there any mechanism to switch on verbose messages during compilation/elaboration/linkage time of the interpreter to see what it is doing with the packages?##! /usr/local/bin/perl package my_package; require(Exporter); @ISA = qw(Exporter); @EXPORT = qw( %my_hash ); %my_hash = ( ... );
In reply to Re^2: access to hashes with same name, from different packages with same name
by utku
in thread access to hashes with same name, from different packages with same name
by utku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |