package Config; use strict; use warnings; use base 'Exporter'; BEGIN { # Things to export by default - minimize this, if you use it at all our @EXPORT = qw( ); # Things to export when the calling code requests them our @EXPORT_OK = qw( \$database \$tmplfile \$blog_title ); # A handy way of grouping exported items our %EXPORT_TAGS = ( all => [ @EXPORT, @EXPORT_OK ] ); } our $database = 'data/site.db'; our $tmplfile = 'templates/index.html'; our $blog_title = 'example.com'; 1; #### #!/path/to/perl use strict; use warnings; use lib qw(/var/www/blogapp); use Config qw($database, $tmplfile, $blog_name); # or just # use Config qw(:all); # if you want everything the Config module exports