sierrathedog04 has asked for the wisdom of the Perl Monks concerning the following question:
This program will actually compile and run without error. If I remove the if ("1" eq "2") condition then I get an error saying that the subroutine does not exist.#!usr/bin perl -w use strict; if ("1" eq "2") { print hello(); } sub helloBROKEN { print "hello world\n"; }
I would like for perl to warn me whenever I refer to a subroutine which does not exist.
Does this behavior indicate that perl is only checking my subroutine references at runtime? Is there any way to force perl to check my subroutine references at compile time?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Can I Force perl to Check Subroutine References at Compile Time?
by tye (Sage) on Jan 25, 2001 at 23:05 UTC | |
|
Re: Can I Force perl to Check Subroutine References at Compile Time?
by $code or die (Deacon) on Jan 26, 2001 at 02:51 UTC | |
|
Re: Can I Force perl to Check Subroutine References at Compile Time?
by Albannach (Monsignor) on Jan 25, 2001 at 22:58 UTC | |
by spaz (Pilgrim) on Jan 26, 2001 at 03:55 UTC | |
by eg (Friar) on Jan 26, 2001 at 00:08 UTC | |
|
Re: Can I Force perl to Check Subroutine References at Compile Time?
by boo_radley (Parson) on Jan 26, 2001 at 00:07 UTC |