in reply to Re^2: package compiling
in thread package compiling
Add ...
use strict; use warnings;
... and perhaps ...
use 5.008_003;
(because older perls may have older Exporters), then the code looks quite good.
Next step is to think about stopping exporting without explicit request (i.e. move exports from @EXPORT to @EXPORT_OK, think about %EXPORT_TAGS, learn about tag handling utility functions in Exporter).
Then, you could re-think your design. Do you really need to export a variable? Perhaps an object is a much better solution for your problem.
On the other hand, sometimes exporting a variable is the best solution. In some situations, exporting it by default is even better than exporting on demand.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: package compiling
by Anonymous Monk on Apr 22, 2011 at 11:56 UTC | |
by afoken (Chancellor) on Apr 22, 2011 at 15:57 UTC |