in reply to Re: require a module and import array data
in thread require a module and import array data

########################################################## # db_data.pm use strict; use warnings; package db_data; use Exporter; my @ISA = qw(Exporter); my @EXPORT = qw(@LoH); my @LoH = ( { database => 'Pxxxxx', hostname => 'wpprd0.com', servicename => 'pqxxxx', port => '9010', username => 'mmmmmm', password => 'pl', }, ) ; 1;
@LoH array is still not available to main routine

Replies are listed 'Best First'.
Re^3: require a module and import array data
by Corion (Patriarch) on Apr 09, 2015 at 14:49 UTC

    So, have you read the other link I provided?

    Alternatively, have you read the Exporter documentation and examples? They do not mention lexical variables, neither for @EXPORT nor for the exported variables. Maybe you want to explain why you chose to use lexical variables there.

      from Exporter 'The symbols can represent functions, scalars, arrays, hashes, or typeglobs'

        from Exporter 'The symbols can represent functions, scalars, arrays, hashes, or typeglobs'

        And then what happened?

        my @EXPORT isn't going to work, ever

      I can't access the other link....company is blocking that URL

        Then maybe you can go to an internet cafe, open the link there and print it out.

Re^3: require a module and import array data
by Anonymous Monk on Apr 09, 2015 at 14:47 UTC

    Take a closer look at Exporter, my isn't used for any of the vars , they are supposed to be globals ... my vars (not globals) cannot be exported

      got it! Thanks...it was the lexical 'my' @LoH in the db_data module