# XYZ.pm package XYZ; use strict; use warnings; require Exporter; our @ISA=qw/Exporter/; our @EXPORT_OK = qw/PI CONST/; our $PI = 3.14; use constant CONST => 10.10; 1; #### # example.pl use strict; use warnings; use lib '.'; require XYZ; print "PI=".$XYZ::PI."\n"; print "CONST=".XYZ::CONST."\n"; #### Bareword "XYZ::CONST" not allowed while "strict subs" in use at example.pl line 13. Execution of example.pl aborted due to compilation errors. #### Name "XYZ::PI" used only once: possible typo at example.pl line 11. PI=3.14