Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re (tilly) 5: No excuses about not using

by MeowChow (Vicar)
on May 04, 2001 at 01:22 UTC ( #77782=note: print w/replies, xml ) Need Help??

in reply to Re (tilly) 5: No excuses about not using
in thread variables not posting?

Strange, I only see this warning in Win32 AS Perl 5.6; it's not present under Linux 5.6.1/5.00503 or even Cygwin 5.6. With your variation, the warning comes out afterwards, so it looks as if the first line is the problem:
About to import Imported main::mysub() called too early to check prototype at C:\Projects\GPerl +\Test\ line 1. mysub: 1
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: Re (tilly) 5: No excuses about not using
by chipmunk (Parson) on May 04, 2001 at 01:41 UTC
    On the contrary, the warning does occur under perl 5.6.1 on Linux, as well as perl 5.6.0 and perl 5.7.1. Are you sure you had warnings turned on for all your tests?

    The warning doesn't occur in 5.005_03 because the warning wasn't implemented until 5.6.0. :)

    Anyway, this warning is actually produced at the end of the compile phase, after the entire script has been compiled:

    warn "About to call\n"; mysub(1); warn "Called\n"; BEGIN { package Foo; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(mysub); sub mysub ($) { warn "mysub: @_\n" }; } BEGIN { warn("About to import\n"); Foo->import(); warn("Imported\n"); } CHECK { warn "Done compiling.\n" } INIT { warn "Running.\n" } __END__ About to import Imported main::mysub() called too early to check prototype at line 4. Done compiling. Running. About to call mysub: 1 Called
      Agh! Indeed I forgot to enable warnings. That was pretty damn stupid of me.
                     s aamecha.s a..a\u$&owag.print
Re (tilly) 7: No excuses about not using
by tilly (Archbishop) on May 04, 2001 at 01:25 UTC
    Then it is a run-time check.

    BTW the fact that ActiveState's Perl does not correspond to things built from source bothers me...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77782]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-11-25 11:18 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (355 votes). Check out past polls.