NAME

warnings::pedantic - Dubious warnings for dubious constructs.

VERSION

Version 0.01

SYNOPSIS

This module provides a 'pedantic' warning category, which, when enabled, warns of certain extra dubious constructs.

use warnings::pedantic;

grep { ... } 1..10; # grep in void context
close($fh);         # close() in void context
print 1;            # print() in void context

Warnings can be turned off with

no warnings 'pedantic';

as well as

no warnings;

or

no warnings::pedantic;

Additionally, you can turn off specific warnings with

no warnings 'void_grep';
no warnings 'void_close';
no warnings 'void_print'; # printf, print, and say

AUTHOR

Brian Fraser, <fraserbn at gmail.com>

BUGS

Please report any bugs or feature requests to bug-warnings-pedantic at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=warnings-pedantic. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

The warning for void-context grep was at one point part of the Perl core, but was deemed too controversial and was removed. Ævar Arnfjörð Bjarmason recently attempted to get it back to the core as part of an RFC to extend warnings.pm, which in turn inspired this module.

LICENSE AND COPYRIGHT

Copyright 2014 Brian Fraser.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 122:

Non-ASCII character seen before =encoding in 'Ævar'. Assuming UTF-8