How do I stop warnings from external packages?

Discussion in 'Perl Misc' started by Justin C, Mar 11, 2008.

  1. Justin C

    Justin C Guest

    I have a program with a 'require' line. The required item is another
    program which puts a whole bunch of stock codes from an SQL database
    into a hash, the has is what is used in the main program. I'm not
    familiar with working this way (I have no idea how I wrote that in the
    first place!).

    The require is something like this:

    package ProductCodes;
    %codes {
    Justin C, Mar 11, 2008
    #1
    1. Advertising

  2. Justin C

    Justin C Guest

    On 2008-03-11, Frank Seitz <> wrote:
    > Justin C wrote:
    >>
    >> The warning is:
    >>
    >> Name "ProductCodes::codes" used only once: possible typo at
    >>
    >> How can I stop this without turning off warnings?

    >
    > Replace require by use or
    >
    > { no warnings 'once'; print $ProductCodes::codes{$req_delta}; }


    That's got it, thanks Frank.

    Justin.

    --
    Justin C, by the sea.
    Justin C, Mar 13, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul  Smith
    Replies:
    0
    Views:
    718
    Paul Smith
    Nov 18, 2003
  2. I.L.B.

    External packages

    I.L.B., Nov 19, 2004, in forum: Java
    Replies:
    4
    Views:
    482
    thufir
    Jan 13, 2005
  3. David Lyon
    Replies:
    19
    Views:
    557
    David Lyon
    Apr 24, 2009
  4. Ted Sung
    Replies:
    1
    Views:
    299
    Sherm Pendley
    Aug 30, 2004
  5. Ian
    Replies:
    3
    Views:
    158
Loading...

Share This Page