0

Is there a way to re-export the variables that are imported from another module.

Thanks

PMat
  • 2,039
  • 2
  • 29
  • 46
  • Please explain what you mean. What is it you want to do? – Borodin Jan 16 '14 at 19:09
  • @Borodin in my module 1 I am exporting some global variable. Module 2 uses module 1. I want to re-export the module 1 global variables from module 2, so in my Perl script i can use them. My Perl script uses module 2. I can always access them in my perl script like Module1->variable. But I want to know if i can access directly. – PMat Jan 16 '14 at 19:25

1 Answers1

5

Yes, just like any other package variables.

use Module qw( $Var );
our @EXPORT_OK = qw( $Var );
use Exporter qw( import );
ikegami
  • 367,544
  • 15
  • 269
  • 518