aantonyselvam has asked for the wisdom of the Perl Monks concerning the following question:
I have to import the functions and variables which is in EXPORT and EXPORT_OK variable.
@EXPORT = qw(&shuffle @card_deck); @EXPORT_OK = qw(&collect @list); our @card_deck = qw(this is for testing); our @list = qw( ass Jack queen king ); sub shuffle { return "shuffle is done\n" } sub distribute{ return "distribute is OK\n" } sub collect{ return "Collection is finished\n" } 1;
if we use the use package it will import the Export variable if we use the use package qw(..) it will import the Export_OK variable I have to import both the variable in one (use) statement.
for example the export is having more then 100 function and export_ok is having couple of function and some variable. How to import both the function and variable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Export in perl
by moritz (Cardinal) on Feb 07, 2011 at 12:41 UTC | |
|
Re: Export in perl
by Anonymous Monk on Feb 07, 2011 at 11:38 UTC | |
|
Re: Export in perl
by Khen1950fx (Canon) on Feb 07, 2011 at 14:58 UTC | |
by ikegami (Patriarch) on Feb 07, 2011 at 22:42 UTC | |
by Anonymous Monk on Feb 07, 2011 at 21:33 UTC |