Nikola Janceski wrote:
> WTF doesn't perl -c check for valid subroutines/function calls?
>
> I can write a perlscript calling a function that doesn't exist but perl -c
> will say syntax ok.
> ie:
> % perl -ce "nothing_here('some junk')"
> -e syntax OK
>
> % perl -e "nothing_here('some junk')"
> Undefined subroutine &main::nothing_here called at -e line 1.
>
> That doesn't make sense!
> It should check function calls at compile time, correct?
> So why not for -c?
I'd hazard a guess it's to do with it sometimes being hard to tell if a
function does exist or not at compile time. Think AUTOLOAD and string eval.
Thanks,
Daniel
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]