Package NewModule; use Exporter; # an application by ‘use’ operator.# This Exporter package has @ISA array to look for a specific method, this array keeps track of classes it is inheriting. @ISA=qw(Exporter); @EXPORT=qw(VAR1 VAR2 VAR3); # The symbols VAR1, VAR2, VAR3 loaded by default @EXPORT_OK qw(VAR4 VAR5); # the symbols VAR4 and VAR5 only loaded if there is a request.
Jatin
Jan 5th, 2013
%EXPORT_TAGS = (tag_name => [anonymous array/Array reference]);
It is to provide the tag to Anonymous array/Array reference which is generally @EXPORT_OK
for example:
%EXPORT_TAGS = (all => @EXPORT_OK]);
At the time of loading use simply
use Bar qw/all/ # instead of writing all the symbols
What's the significance of @ISA, @EXPORT @EXPORT_OK %EXPORT_TAGS list & hashes in a perl package? With example?
Profile Answers by geek_zubi Questions by geek_zubi
Questions by geek_zubi answers by geek_zubi