#!/usr/bin/perl package subs::utils; use strict; use warnings; BEGIN { require Exporter; # set the version for version checking our $VERSION = 1.00; # Inherit from Exporter to export functions and variables our @ISA = qw(Exporter); # Functions and variables which are exported by default # exported only if fully qualified our @EXPORT_OK = qw($henky); } our $henky = "henky_init"; END { } 1; # return a true value, standard module behaviour #### use subs::utils; print "now1: " . $subs::utils::henky . "|\n"; $subs::utils::henky = "spanky"; print "now2: " . $subs::utils::henky . "|\n"; #### use subs::utils; print "now3: " . $subs::utils::henky . "\n"; #### now1: henky_init| now2: spanky| now3: henky_init #### BEGIN { require "My/Module.pm"; My::Module->import(); }