From: RedGrittyBrick on

> cat y.pl
#!/usr/bin/perl
use strict;
use warnings;
foo();

>./y.pl
Undefined subroutine &main::foo called at ./y.pl line 4.

>perl -MO=Lint y.pl
y.pl syntax OK


What's a better way to check whether a program has undefined subroutines?

--
RGB
From: RedGrittyBrick on
On 23/06/2010 14:35, RedGrittyBrick wrote:
>
> > cat y.pl
> #!/usr/bin/perl
> use strict;
> use warnings;
> foo();
>
> >./y.pl
> Undefined subroutine &main::foo called at ./y.pl line 4.
>
> >perl -MO=Lint y.pl
> y.pl syntax OK
>
>
> What's a better way to check whether a program has undefined subroutines?
>


>perl -MO=Lint,all y.pl
Undefined subroutine foo called at y.pl line 4
y.pl syntax OK


I should read documentation with more care :-(

--
RGB