Hello all,

I am writing some modules (some of my first ones) for RPG (role playing game) systems. I have created a library of RPG and started adding modules under it. I grabed a module template off the net as the basis.

The first module (included below) I created was a basic dice roller and works great on my local system. But when I move it up to my provider it gives the following error message when run from the command line:

Array found where operator expected at RPG/Dice.pm line 11, at end of +line (Do you need to predeclare our?) Operator or semicolon missing before %EXPORT_TAGS at RPG/Dice.pm line +20. Ambiguous use of % resolved as operator % at RPG/Dice.pm line 20. Array found where operator expected at RPG/Dice.pm line 25, at end of +line (Do you need to predeclare our?) syntax error at RPG/Dice.pm line 11, near "our @ISA " syntax error at RPG/Dice.pm line 25, near "our @EXPORT_OK " BEGIN failed--compilation aborted at test.pl line 5.

The version of perl from the provider is 5.005_2. And I'm only calling it from a simple test program:

Lengthy code moved to HTML comments. "View Source" to see the code.

Edit 2001-04-19 by tye


In reply to Writing Modules - problem by Anonymous Monk

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.