# Foo.pm package Foo; use warnings; use strict; use parent 'Exporter'; our @EXPORT_OK = qw(hello set_hello get_hello); my $hello = hello('evaluated during module inclusion'); sub hello { my $h = shift; return $h; } sub get_hello { return $hello; } sub set_hello { return $hello = shift; } print 'from package ', __PACKAGE__, " during use: '$hello' \n"; 1;