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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.