How do I export a package symbol to a namespace in Perl?
- by Mike
I'm having trouble understanding how to export a package symbol to a namespace. I've followed the documentation almost identically, but it seems to not know about any of the exporting symbols.
mod.pm
#!/usr/bin/perl
package mod;
use strict;
use warnings;
require Exporter;
@ISA = qw(Exporter);
@EXPORT=qw($a);
our $a=(1);
1;
test.pl
$ cat…