Struggling again.....two questions really.
I am writing an app the will have a lot of user changeable strings (button names, customer names, error messages etc.). I thought the best way to do this is to create a variable.pl file, list all my variables in here and then call them from my other files. Obviously the whole, local/global variable issue arises when using strict pragma. But I can't think of a Perl way to do it.
I have been looking at Exporter but it seems I need to specify each variable to export, which could be literally 100's. Is there any way to Export a whole file from a package? I have read the perldoc Exporter page but there doesn't seem to be anyway to use the whole file instead of specifying individual variables or functions etc.
I am thinking I might be able to do this by creating a hash of all my variables and just exporting that, but I am not sure if this is acceptable?
And, is this bad Perl practice?
In reply to Exporting Variables by packetstormer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |