Why didn't 'use strict' catch this error?

From: Rob Richardson (interrobang_at_yahoo.com)
Date: 05/31/04

  • Next message: Adam: "Re: Any wrong?"
    Date: Sun, 30 May 2004 16:57:36 -0700 (PDT)
    To: beginners@perl.org
    
    

    Greetings!

    I found the source of the "impossible error". Here are the lines that
    caused it:

            my $userList = new UserList($userFile);
            my $user = UserList->GetUser($logname);

    I have a "use UserList" line near the top of this file. I also have
    "use strict" and "use warnings".

    I would have expected Perl to complain about the bareword "UserList" in
    the second line, or find some other way to complain about it. Instead,
    it merrily tried to execute this line, and threw the error message
    halfway through the GetUser() function in the UserList package. Why
    didn't an error get thrown? If this is a valid construct in Perl, how
    is it supposed to be used?

    Thanks again!

    Rob Richardson

            
                    
    __________________________________
    Do you Yahoo!?
    Friends. Fun. Try the all-new Yahoo! Messenger.
    http://messenger.yahoo.com/


  • Next message: Adam: "Re: Any wrong?"

    Relevant Pages

    • Re: Why cant CHUCK.K pay his TAXES....AGAIN???
      ... He will make calls to complain, ... Kinda like you did with Toad and his ISP? ... And perhaps me with Yahoo? ...
      (alt.vacation.las-vegas)
    • Re: fstab and LABEL=
      ... Complain where you wish, ... all users expect a better fedora than before. ... Do You Yahoo!? ... Mail has the best spam ...
      (Fedora)
    • Re: fstab and LABEL=
      ... Complain where you wish, ... all users expect a better fedora than before. ... Do You Yahoo!? ... Mail has the best spam ...
      (Fedora)
    • Re: EIS enries of Roger L. Bagula
      ... > I while ago I thought that the Yahoo number theory group might ... Complain to the moderatorof the list. ... 1st bug in MS win2k source code found after 20 minutes: ...
      (sci.math)