so i'm trying to pump a bit of laziness into my code by learning how to make modules. my first attempt is failing miserably - and it's mostly copied right out of Camel(3ed)...

package myMod; use strict; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(tryIt); sub tryIt { print "We did it!!\n\n"; } 1;
which is called with:
use myMod; BEGIN { push @ISA, "/home/jptxs"; } tryIt();
when i leave strict out of the module, we're cool. When i put it in we get:
/home/jptxs > perl -w getMyMod Use of reserved word "our" is deprecated at myMod.pm line 5. Bareword "our" not allowed while "strict subs" in use at myMod.pm line + 5. Unquoted string "our" may clash with future reserved word at myMod.pm +line 5. Array found where operator expected at myMod.pm line 5, at end of line (Do you need to predeclare our?) Global symbol "@ISA" requires explicit package name at myMod.pm line 5 +. Use of reserved word "our" is deprecated at myMod.pm line 6. Bareword "our" not allowed while "strict subs" in use at myMod.pm line + 6. Unquoted string "our" may clash with future reserved word at myMod.pm +line 6. Array found where operator expected at myMod.pm line 6, at end of line (Do you need to predeclare our?) Global symbol "@EXPORT" requires explicit package name at myMod.pm lin +e 6. syntax error at myMod.pm line 5, near "our @ISA " BEGIN failed--compilation aborted at getMyMod line 1.
if i take out the our's but leave in the strict:
/home/jptxs > perl -w getMyMod Global symbol "@ISA" requires explicit package name at myMod.pm line 5 +. Global symbol "@EXPORT" requires explicit package name at myMod.pm lin +e 6. Compilation failed in require at getMyMod line 1. BEGIN failed--compilation aborted at getMyMod line 1.
I'm very confused...and after feeling so perl-elated reading the camel...

-- I'm a solipsist, and so is everyone else. (think about it)


In reply to my first module by jptxs

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.