I think i have a basic misunderstanding when the module code is executed and the exported variable $_POST is initialized.
Directly after use YourModule; is parsed, perl search for that module, compiles it and runs its mainline, including the initialization of $_POST.
Minimal-ish example:
$ cat A.pm package A; use strict; use warnings; use Exporter qw/import/; our @EXPORT = qw/$_POST/; our $_POST = 42; 1; $ perl -I. -wE 'use A; say $_POST' 42
In reply to Re: How to initialize a Global in a module
by moritz
in thread How to initialize a Global in a module
by Henric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |