use xxx; #imports all of the symbols in @EXPORT
use xxx (); #imports none of the symbols in @EXPORT
#this empty list is the same as: (updated)
#BEGIN { require Module }
use xxx qw(OpenConnection $LoggedOn_user_id); # imports
# all of the symbols in @EXPORT AND subroutine OpenConnection
# AND the scalar $LoggedOn_user_id from @EXPORT_OK
####
#!/usr/bin/perl
use warnings;
use strict;
package manageusers;
BEGIN {
use vars qw($VERSION @ISA @EXPORT);
use DBI;
# $ENV{DBI_TRACE}=1;
# $ENV{PERL_DBI_DEBUG}=1;
require Exporter;
@ISA = qw(Exporter);
# exported functions
our @EXPORT_OK = qw(
$attempts
$adminaccess
$LoggedOn_user_id
Now
CheckValidLoginChar
CheckValidEmailChar
print_md5_javascript);
$VERSION = '0.0.1';
}
our $LoggedOn_user_id=33;
our $attempts = 99;
1;
##
##
#!/usr/bin/perl
use strict;
use warnings;
use manageusers qw($LoggedOn_user_id);
print "$LoggedOn_user_id\n"; #prints 33
print "$manageusers::attempts \n"; #prints 99
#Note that $attempts is NOT exported imported,
but still #can be accessed by the fully qualified name!