Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request to add option to run syntax_ok() with global warnings #15

Open
fschlich opened this issue Oct 21, 2015 · 1 comment
Open

request to add option to run syntax_ok() with global warnings #15

fschlich opened this issue Oct 21, 2015 · 1 comment

Comments

@fschlich
Copy link

Hi, I'm forwarding a request / wishlist bug received at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769970:

It would be nice if the syntax_ok() check could also enable (maybe
optionally) the perl global warnings, so that some of the problems
that only get detected with that, and not with «use warings» can be
spotted. Here's an example where this is relevant:

,--- compile-warn.pl ---

!/usr/bin/perl

use strict;
use warnings;
use POSIX qw(getcwd);
use Cwd;
my $cwd = getcwd();
1;
`---

,---
$ perl -c compile-warn.pl
compile-warn.pl syntax OK
$ perl -cw compile-warn.pl
Subroutine main::getcwd redefined at /usr/share/perl/5.20/Exporter.pm line 66.
at compile-warn.pl line 7.
compile-warn.pl syntax OK
`---

@ghost
Copy link

ghost commented Apr 1, 2016

There is Test::Warnings that can look for the presence of warnings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant