with something easier like#!/usr/bin/perl use strict; use warnings; use DBI; use Config::IniFiles; use IO::File; use utf8; # Skript ist UTF8-codiert use encoding 'utf8'; # Strings in UTF8 binmode STDOUT, ':utf8'; # Ausgaben in UTF8 use POSIX qw/strftime/; $ENV{ORACLE_HOME}="/opt/oracle/oracle/product/10.2.0/db_1"; $ENV{NLS_LANG}="GERMAN_GERMANY.UTF8"; # Datenbank ist UTF8
I know, it should be done with an exporter module, but I don't want just to import some subs but instead load the modules into namespace of the caller. Like Modern::Perl imports use strict; use warnings; use feature ...; into the callers package. In addition it should be easy to understand what is done (so I'd prefer not to hack around with mro::caller-stuff or different), just like#!/usr/bin/perl use MyFirma::Standard; # and now I want to use and have everything like above
I think, I have already seen a module doing this, but I don't remember and I'm stuck finding the right words to search, so I hope you can help me herepackage MyFirma::Standard; use GreatExporter => {'use strict', 'use warnings', 'use DBI', ... and so on}
Greetings,
Janek Schleicher
In reply to How to export several modules intu users name space to not have a use ...; use ...; use ...; with the same modules all over again by bigj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |