Login
Jeffrey Ryan Thalhammer [Wed, 6 Oct 2010 18:38:11 +0000 (18:38 +0000)]
Added -forced-filename option to the P::C::Document contstructor.
This allows you to give the Document a filename in situations where
the Document is being constructed from something that doesn't already
have a filename (like a reference to a scalar containing actual source
code).
Tom Wyant [Tue, 14 Sep 2010 05:25:14 +0000 (05:25 +0000)]
RT #61311: Subroutines::ProhibitUnusedPrivateSubroutines dies on
"&_name" call
The problem was that the return value of sprevious_sibling() was being
incorrectly tested.
About 12 lines into sub _find_sub_reference_in_document(), and again
about 18 lines in, the code 'defined $prior' occurs. The 'defined'
should be removed; that is, the code should just be '$prior'.
The erroneous code assumed that the PPI method sprevious_sibling()
returned undef if there was no previous sibling in the parse tree. In
fact, it is documented as returning a false value.
Tom Wyant [Sat, 11 Sep 2010 16:08:01 +0000 (16:08 +0000)]
Add stop words to P::C::P::ControlStructures::ProhibitPostfixControls.
Tom Wyant [Thu, 9 Sep 2010 23:58:10 +0000 (23:58 +0000)]
Move the Changes comment on commit 3919 to the 'Bugs' section (what was
I thinking?) and added the RT number.
Tom Wyant [Thu, 9 Sep 2010 23:51:37 +0000 (23:51 +0000)]
RT#61071: OptionsProcessor vs perl 5.8.3 Exporter
Updated inc/Perl/Critic/BuildUtilities.pm to require Exporter version
5.63, to get a version that understands export tags in positions other
than leading ones. Another solution was to move all the tags to the
leading position, but I thought it would be difficult to ensure that the
code stayed that way. I could also have gone with version 5.59 (the
first dual-lifed version), but the CPAN testers say 5.63 (the current
version) works back to perl 5.6.1.
Elliot Shank [Sat, 4 Sep 2010 20:38:08 +0000 (20:38 +0000)]
Add "when" support to ControlStructures::ProhibitPostfixControls.
Tom Wyant [Wed, 1 Sep 2010 18:42:04 +0000 (18:42 +0000)]
Add '_' to the tr/// that counts arguments in the subroutine prototype,
since this is now valid (meaning, '$ but use $_ if no argument
specified').
Tom Wyant [Wed, 1 Sep 2010 15:14:24 +0000 (15:14 +0000)]
Make Subroutines::ProhibitManyArgs understand prototype grouping. That
is, prototype (\[$@%]) specifies one argument, not three. Tests for this
added to .run file.
Elliot Shank [Mon, 30 Aug 2010 10:53:10 +0000 (10:53 +0000)]
Reduce use of PPI overloads i
ControlStructures::ProhibitPostfixControls.
Elliot Shank [Mon, 30 Aug 2010 02:18:05 +0000 (02:18 +0000)]
Bump trunk version of Perl-Critic to 1.110.
Elliot Shank [Mon, 30 Aug 2010 02:14:24 +0000 (02:14 +0000)]
Update Changes on trunk to match what was released in 1.109.
Elliot Shank [Mon, 30 Aug 2010 01:27:11 +0000 (01:27 +0000)]
It turns out that the original complaint in RT #3077 for
RequireInterpolationOfMetachars dinging use of overload.pm really was
a general issue that the policy shouldn't complain about '${}' or
'@{}' because they're invalid syntax.
Elliot Shank [Mon, 30 Aug 2010 01:08:33 +0000 (01:08 +0000)]
Fix detection of q<'@whatever'> in
ValuesAndExpressions::RequireInterpolationOfMetachars found due to the
Email::Address change.
Tom Wyant [Tue, 24 Aug 2010 17:41:11 +0000 (17:41 +0000)]
Added method Perl::Critic::Document->ppix_regexp_from_element(), as a
caching wrapper for PPIx::Regexp->new(), inspired by find() and (more
recently) _nodes_by_namespace().
Rewrote all uses of PPIx::Regexp->new_from_cache() and
PPIx::Regexp->new() (found in
RegularExpressions::ProhibitComplexRegexes) in terms of
ppix_regexp_from_element().
Got rid of PPIx::Regexp->flush_cache(), which is no longer needed, and
which I was never really happy with. With the cache on the document, it
Just Works, stays as long as it is needed, and automatically goes away
when it is no longer needed.
This means 'use PPIx::Regexp' only appears in Perl::Critic::Document.
Tom Wyant [Tue, 24 Aug 2010 04:47:24 +0000 (04:47 +0000)]
Change the test in t/08_document.t which tests
Perl::Critic::Document->uses_module() when there are no include
statements. The original (with an empty document) tickles what just
became RT #60671 in the PPI queue. The minimal way to avoid this
appeared to be using a document consisting of a single space.
It turns out that if you call PPI::Document->index_locations() on a
document with no tokens at all, it gets confused, and that's all RT
#60671 is about. Adam hadn't revoked my commit bit yet, so I committed
a proposed fix.
Tom Wyant [Mon, 23 Aug 2010 18:08:06 +0000 (18:08 +0000)]
Since PPIx::Regexp is no longer optional, some of the tests that use it
no longer need separate .t files. These are moved into the .run files.
Unfortunately it looks like I forgot to add
t/20_policy_prohibit_unused_variables.t to subversion in the first
place, but that's where the tests in the .run file came from.
Added version to 'use PPIx::Regexp' in lib/Perl/Critic.pm.
Elliot Shank [Mon, 23 Aug 2010 02:15:17 +0000 (02:15 +0000)]
Add failing test for
ValuesAndExpressions::RequireInterpolationOfMetachars for punctuation
variables (it fails to complain about q<'@_'>) and fix a small
self-compliance issue in the Policy itself.
Elliot Shank [Mon, 23 Aug 2010 02:09:56 +0000 (02:09 +0000)]
Add "subscripted" to xt/author/40_stop_words.
Elliot Shank [Mon, 23 Aug 2010 01:53:01 +0000 (01:53 +0000)]
Fix missing import of PPIx::Regexp in Perl::Critic.
Elliot Shank [Mon, 23 Aug 2010 01:51:23 +0000 (01:51 +0000)]
Make xt/author/94_includes.t be more descriptive of what it's testing.
Elliot Shank [Mon, 23 Aug 2010 01:27:54 +0000 (01:27 +0000)]
Note ValuesAndExpressions::RequireInterpolationOfMetachars fix in
Changes.
Elliot Shank [Mon, 23 Aug 2010 01:25:02 +0000 (01:25 +0000)]
Make PPIx::Regexp, Perl::Tidy, Pod::Spell, and Text::ParseWords
non-optional.
Elliot Shank [Mon, 23 Aug 2010 01:04:56 +0000 (01:04 +0000)]
Fix ValuesAndExpressions::RequireInterpolationOfMetachars with respect
to Email::Address 1.890. This consists of checking for the presence
of an "@" anywhere in the value and removal of a bad test: "@{}" and
"${}" are syntax errors.
Elliot Shank [Sat, 21 Aug 2010 02:58:38 +0000 (02:58 +0000)]
Move IPC::Open2 from the recommended to required dependencies since
it's core.
Tom Wyant [Fri, 20 Aug 2010 04:33:39 +0000 (04:33 +0000)]
Realized I could simplify the code in commits 3886 and 3888 (both to do
with having P::C::P::RegularExpressions::ProhibitUnusedCapture look
inside regular expressions) because PPIx::Regexp::Token::Interpolation
is a subclass of PPIx::Regexp::Token::Code, and so I could just look for
the latter, which may appear anywhere in the regexp.
Yes, this proves I don't know my way around my own code. Sigh.
Tom Wyant [Fri, 20 Aug 2010 02:47:25 +0000 (02:47 +0000)]
Variables::ProhibitUnusedVariables now looks inside regular expressions
if PPIx::Regexp can be loaded.
Tom Wyant [Wed, 18 Aug 2010 18:48:32 +0000 (18:48 +0000)]
Have Subroutines::ProhibitUnusedPrivateSubroutines look inside regular
expressions if PPIx::Regexp is available.
Tom Wyant [Wed, 18 Aug 2010 05:21:43 +0000 (05:21 +0000)]
Added the line number of the offending '=head1 NAME' to the
P::C::P::Documentation::RequirePackageMatchesPodName violation
description, using the same dodge Elliot used for
Documentation::RequirePodLinksIncludeText. This is kind of for RT
#59176, though that ticket asked for a way to jigger the line number in
the exception.
Tom Wyant [Fri, 13 Aug 2010 20:34:38 +0000 (20:34 +0000)]
#59065 Suggested policy: prohibit conditional use statements
Modules::ProhibitContitionalUseStatements and the associated .run file
were attached to the RT ticket. These are committed with very minor
changes:
* Added =for stopwords evals;
* Dropped trailing space in a few places.
These changes were made to satisfy authortest.
Tom Wyant [Mon, 9 Aug 2010 03:39:17 +0000 (03:39 +0000)]
Update inc/Perl/Critic/BuildUtilities.pm to require version 0.010 of
PPIx::Regexp, since that is needed for the
P::C::P::RegularExpressions::ProhibitUnusedCapture ability to find
captures in the replacement portion of s/.../.../e.
This really should have been in commit 3888, but I forgot. Sorry.
Tom Wyant [Mon, 9 Aug 2010 00:34:55 +0000 (00:34 +0000)]
Have RegularExpressions::ProhibitUnusedCapture account for capture
variables used in the replacement portion of s/.../.../e.
Tom Wyant [Sun, 8 Aug 2010 19:42:39 +0000 (19:42 +0000)]
#60179: BuiltinFunctions::ProhibitStringyEval dies on eval "#...";
The code assumed that a PPI::Document manufactured from the argument to
a stringy eval would have significant children. But Sullivan Beck, in
Date::Manip 5.54, found a reason to do a stringy eval on a comment. This
resulted in a fatal error in the policy.
The fix was simply to check to see if the first significant child was
actually defined, and report a violation if not. The .run file was
updated as well. If the patch is not in place, the .run file experiences
a fatal error, not a test failure. Caveat tester.
Tom Wyant [Wed, 4 Aug 2010 22:59:05 +0000 (22:59 +0000)]
Added support for @-, @+, and their English equivalents. This only works
for literal integer subscripts, though. There appears to be no way for
static analysis to take account of $^N and its English equivalent.
Tom Wyant [Wed, 4 Aug 2010 21:03:01 +0000 (21:03 +0000)]
Forgot to put the RT number on the ProhibitUnusedCapture fix committed
as svn revision 3884. It's RT #60002.
Tom Wyant [Wed, 4 Aug 2010 00:36:29 +0000 (00:36 +0000)]
RT #60002 - RegularExpressions::ProhibitUnusedCapture does not
understand English equivalents of capture variables.
The variable of immediate concern is $LAST_PAREN_MATCH. This is now
recognized provide the document includes 'use English;'.
Tom Wyant [Sat, 31 Jul 2010 03:45:01 +0000 (03:45 +0000)]
Add new policy InputOutput::RequireEncodingWithUTF8Layer. This complains
if it sees ':utf8' rather than ':encoding(utf8)' in open() or binmode().
It is severity 5.
The issue is that ':utf8' flags the string as UTF8 without validating
it. Invalid UTF8 can have bad effects in your code. Exhibit "A" is an
exploit reported on PerlMonks where a script running with -T read input
and sanitized it with m/^(\w+)$/, after which $1 contained shell
meta-characters. This leads to the same kind of problems that the
two-argument open() has, and that policy is severity 5.
Tom Wyant [Sat, 31 Jul 2010 03:09:03 +0000 (03:09 +0000)]
On the mailing list, Andy Lester suggested having the "policy warning
against checking $@" recommend Try::Tiny. In the belief that this means
P::C::P::ErrorHandling::RequireCheckingReturnValueOfEval, I have done my
best (or worst) to implement the suggestion there.
Tom Wyant [Mon, 12 Jul 2010 23:10:51 +0000 (23:10 +0000)]
RT #59268: Documentation::RequirePodSections should not complain until the first line of POD
Saved the first PPI::Token::Pod containing a '=head1', for use as the
pod-of-record. Reported the error relative to this pod-of-record, so
that the disabling annotation can come before the __END__, the __DATA__,
or the pod-of-record, whichever comes first.
Updated the .run file to test for disablement. Yes, it failed before
applying the patch to the policy.
And holy smokes, Sandy, he remembered to update the Changes file!
Tom Wyant [Fri, 9 Jul 2010 00:14:43 +0000 (00:14 +0000)]
RT 59176: "no critic" for pod after __END__
The problem turned out to be that the determination of the end of the
scope of the Pod::Critic::Annotation was short-stopped because PPI
parses the __END__ as a PPI::Statement::End, and everything after that
is descended from the PPI::Statement::End. The solution was to descend
into the PPI::Statement::End (if it was the last thing found) and
continue the analysis. I suppose it's still possible to short-stop the
annotation, but I can't think of a way to do it.
t/03_annotations.t was updated to check for the ability to extend
annotations into the __END__ of the document.
Astoundingly, the Changes file was also updated.
Elliot Shank [Tue, 29 Jun 2010 21:05:29 +0000 (21:05 +0000)]
Specify a minimum version of version.pm in BuildUtilities. RT #58952.
Tom Wyant [Mon, 28 Jun 2010 00:17:14 +0000 (00:17 +0000)]
Nit-pick the docs in P::C::P::RegularExpressions::RequireDotMatchAnything
Elliot Shank [Sun, 27 Jun 2010 23:30:04 +0000 (23:30 +0000)]
Handle the absence of include statements in
P::C::Document::uses_module().
Elliot Shank [Sun, 27 Jun 2010 23:08:48 +0000 (23:08 +0000)]
Remove debugging code from P::C::Document.
Elliot Shank [Sun, 27 Jun 2010 23:07:22 +0000 (23:07 +0000)]
Fix stupid bug in P::C::Document::_nodes_by_namespace().
Elliot Shank [Sun, 27 Jun 2010 22:47:42 +0000 (22:47 +0000)]
Stupid just-prior-to-commit change to Test::P::C::Policy broke
everything. :]
Elliot Shank [Sun, 27 Jun 2010 22:43:39 +0000 (22:43 +0000)]
Make Test::P::C::Policy well behaved and not export anything by
default.
Elliot Shank [Sun, 27 Jun 2010 19:12:24 +0000 (19:12 +0000)]
Code cleanup of ProhibitMismatchedOperators after applying patch from
RT #58751.
Elliot Shank [Sun, 27 Jun 2010 18:23:36 +0000 (18:23 +0000)]
Apply the patch from RT #58751 to ProhibitMismatchedOperators
unmodified (modulo trailing whitespace). Will need cleanup.
Elliot Shank [Sun, 27 Jun 2010 18:14:32 +0000 (18:14 +0000)]
Create P::C::Document::uses_module().
Elliot Shank [Sun, 27 Jun 2010 17:41:20 +0000 (17:41 +0000)]
Forgot to add PPIx::Utilities::Node to required modules in
BuildUtilities.
Elliot Shank [Sun, 27 Jun 2010 17:22:27 +0000 (17:22 +0000)]
Create namespaces() and subdocuments_for_namespace() on
P::C::Document.
Elliot Shank [Sun, 27 Jun 2010 16:16:18 +0000 (16:16 +0000)]
Make Test::Deep required so that I can use it for P::C::Document
testing.
Tom Wyant [Fri, 25 Jun 2010 19:35:59 +0000 (19:35 +0000)]
Updated P::C::P::ControlStructures::ProhibitMutatingListFunctions to
recognize that s///r (introduced in Perl 5.13.2) does not modify its
argument (instead, it returns the modified string). There is no test for
Perl version, because s///r fails to parse under earlier Perls.
Added a test to the .run file, to check for this.
Updated the Changes file (will wonders never cease!)
Tom Wyant [Fri, 25 Jun 2010 19:30:38 +0000 (19:30 +0000)]
Change xt/author/80_policysummary.t to match revision 3847, which
changed '[ Severity #]' to '[ Default severity #]'.
Elliot Shank [Wed, 23 Jun 2010 16:40:01 +0000 (16:40 +0000)]
Change example in P::C Developer to say "Default severity" instead of
"Severity" in order to match the recent change to PolicySummary.
Elliot Shank [Tue, 22 Jun 2010 22:09:05 +0000 (22:09 +0000)]
Change the PolicySummary to use short names for link names.
Elliot Shank [Tue, 22 Jun 2010 21:47:05 +0000 (21:47 +0000)]
Change "[Severity #]" in the PolicySummary to "[Default severity #}".
Also, mention "perlcritic --profile-proto".
Elliot Shank [Tue, 22 Jun 2010 21:01:40 +0000 (21:01 +0000)]
Add link to Try::Tiny in RequireCheckingReturnValueOfEval.
Elliot Shank [Tue, 22 Jun 2010 20:20:13 +0000 (20:20 +0000)]
Add release description to Changes.
Elliot Shank [Tue, 22 Jun 2010 20:14:07 +0000 (20:14 +0000)]
Bump P::C version to 1.108.
Elliot Shank [Tue, 22 Jun 2010 19:38:35 +0000 (19:38 +0000)]
Fix CORE_DEVELOPER.pod now that the PodSummary build is fixed.
Elliot Shank [Tue, 22 Jun 2010 19:36:47 +0000 (19:36 +0000)]
Update Changes into something readable by users for the 1.108 release.
Elliot Shank [Mon, 21 Jun 2010 14:10:33 +0000 (14:10 +0000)]
Change "Repository" to "repository" in (MY)?META.yml.
Elliot Shank [Sun, 20 Jun 2010 23:25:17 +0000 (23:25 +0000)]
Document Task::Weaken dependency.
Elliot Shank [Sun, 20 Jun 2010 23:21:58 +0000 (23:21 +0000)]
Add dependency upon Task::Weaken (even though I think PPI requires it)
to the prerequisites due to
http://www.cpantesters.org/cpan/report/
07450890-b19f-3f77-b713-
d32bba55d77f
Elliot Shank [Sun, 20 Jun 2010 23:11:39 +0000 (23:11 +0000)]
Set date for 1.107_001 release in Changes.
Elliot Shank [Sun, 20 Jun 2010 23:10:20 +0000 (23:10 +0000)]
Add allow-unsafe to ProfilePrototype.
Elliot Shank [Sun, 20 Jun 2010 22:53:51 +0000 (22:53 +0000)]
Small comment change in Subroutines::ProhibitAmpersandSigils and code
reformat.
Elliot Shank [Sun, 20 Jun 2010 22:35:42 +0000 (22:35 +0000)]
Rename the --unsafe option to --allow-unsafe.
Elliot Shank [Sun, 20 Jun 2010 22:12:13 +0000 (22:12 +0000)]
Move Email::Address from the optional to the required modules in the
P::C POD.
Elliot Shank [Sun, 20 Jun 2010 21:53:38 +0000 (21:53 +0000)]
Theoretically fix the issue with compling P::C::Module::Build at
configure time due to PolicySummaryGenerator dependencies.
Elliot Shank [Sun, 20 Jun 2010 21:30:21 +0000 (21:30 +0000)]
Get rid of use_ok() everywhere except t/00_modules.t and
xt/author/82_optional_modules.t.
Elliot Shank [Sun, 20 Jun 2010 21:12:17 +0000 (21:12 +0000)]
Update to TODO.pod about dumping IO::String.
Elliot Shank [Sun, 13 Jun 2010 23:34:12 +0000 (23:34 +0000)]
Fix false statement in POD about ## no critic paying attention to
blocks.
Elliot Shank [Sun, 13 Jun 2010 23:29:31 +0000 (23:29 +0000)]
Fix links to deprecated modules in Modules::ProhibitEvilModules.
Elliot Shank [Sun, 13 Jun 2010 23:26:31 +0000 (23:26 +0000)]
Bump P::C version to 1.107_001.
Elliot Shank [Sun, 13 Jun 2010 23:22:36 +0000 (23:22 +0000)]
Remove scary warning from INSTALL.
Elliot Shank [Sun, 13 Jun 2010 23:06:22 +0000 (23:06 +0000)]
Update the optional module discussion in CORE_DEVELOPER to match the
list of modules that are not part of the standard optional ones.
Elliot Shank [Sun, 13 Jun 2010 23:03:03 +0000 (23:03 +0000)]
Stop all conditional module usage under xt/. If you're an author,
you've got to run everything.
Elliot Shank [Sun, 13 Jun 2010 19:20:19 +0000 (19:20 +0000)]
Change Modules::ProhibitEvilModules to complain about modules
deprecated by p5p.
Tom Wyant [Mon, 31 May 2010 04:34:52 +0000 (04:34 +0000)]
(Try to) make P::C::P::Subroutines::RequireFinalReturn understand a
final given/when statement. The intent is that this is acceptable if and
only if there is a default block and all branches have a final
unconditional return.
Some simple cases have been added to the .run file, and (glory be!) the
Changes file was updated.
Tom Wyant [Tue, 25 May 2010 21:12:50 +0000 (21:12 +0000)]
RT #57818 - DEVELOPER.pod typo in link to ValuesAndExpressions::ProhibitConstantPragma policy
Elliot Shank [Tue, 25 May 2010 01:42:57 +0000 (01:42 +0000)]
Small typo in RequireFinalReturn POD. RT #57803
Tom Wyant [Sat, 22 May 2010 22:48:12 +0000 (22:48 +0000)]
Tell policy BuiltInFunctions::ProhibitLvalueSubstr not to complain when
there is a low-precedence operator between the substr() and the
assignment operator.
Note that the modified code assumes that anything with the same
precedence as '=' is an assignment operator. The hash that drives the
precedence_of() subroutine contains a bunch of things at the same
precedence as '='. All appear to be things like '||=', which PPI
decomposes into '||' and '=' anyway. But if someone's religion wants a
test for a literal '=', I will be glad to oblige.
Tom Wyant [Sat, 22 May 2010 18:56:41 +0000 (18:56 +0000)]
Have policy TestingAndDebugging::RequireUseStrict accept 'use 5.011' or
greater as equivalent to 'use strict'.
Tom Wyant [Fri, 21 May 2010 21:03:34 +0000 (21:03 +0000)]
Expand list of modules needed for authortest, by actually trying to run
the authortest suite on a virgin Perl.
Tom Wyant [Thu, 20 May 2010 03:23:42 +0000 (03:23 +0000)]
Updated lib/Perl/Critic/CORE_DEVELOPER.pod to try to document the
modules needed over and above the Perl::Critic requirements to get
authortest to run.
Tom Wyant [Tue, 11 May 2010 15:51:39 +0000 (15:51 +0000)]
Bug #57375 for Perl-Critic: [PATCH] Fix spelling error in the documentation
Accepted attached patch.
Elliot Shank [Tue, 11 May 2010 03:47:19 +0000 (03:47 +0000)]
Put 1.106 changes to Changes on trunk.
Tom Wyant [Fri, 7 May 2010 18:41:54 +0000 (18:41 +0000)]
49501 From Debian: RequirePackageMatchesPodName: doesn't use nearest package
Allow any package (rather than nearest) to match the pod NAME. "Nearest"
was not used because of the practice of putting all pod at the end. The
policy still only checks the first NAME section, if more than one
exists, but since I know of no examples of this, I figure it can wait.
Elliot Shank [Tue, 27 Apr 2010 12:14:22 +0000 (12:14 +0000)]
Update P::C::Utils::is_unchecked_call() to include chmod in the set of
builtins covered by autodie.
Elliot Shank [Thu, 22 Apr 2010 01:50:14 +0000 (01:50 +0000)]
Changed violation description to "Quotes used with a string containing
no non-whitespace characters" in
ValuesAndExpressions::ProhibitEmptyQuotes to address RT #56623.
Tom Wyant [Wed, 21 Apr 2010 19:19:29 +0000 (19:19 +0000)]
Wordsmith my recent Changes updates.
Tom Wyant [Wed, 21 Apr 2010 19:11:17 +0000 (19:11 +0000)]
RT #56619 redux
After discussion on the mailing list, added option
allow_in_main_unless_in_subroutine to
P::C::P::ErrorHandling::RequireCarping to control whether 'warn' or
'die' are allowed unconditionally in main:: (unless in a subroutine).
This option is false by default.
The configuration documentation was updated not only to cover this, but
to try to make explicit its interaction with
allow_messages_ending_in_newlines (it's ||, not &&).
The original work was committed as revision 3799.
Tom Wyant [Tue, 20 Apr 2010 18:03:24 +0000 (18:03 +0000)]
RT #56667: No "$VERSION" variable found (false positive)
Wordsmithed $DESC and POD in P::C::P::Modules::RequireVersionVar to
try to make explicit the fact that a lexical $VERSION is not
acceptable either to Perl's version system or to this policy. Better
wordsmithing welcome.
Tom Wyant [Mon, 19 Apr 2010 18:38:58 +0000 (18:38 +0000)]
RT #56619: "die" used instead of "croak" (possibly false positive)
Allow 'warn' or 'die' in name space main::, provided it is not in a
subroutine. This implementation per the BUGS section of the
P::C::P::ErrorHandling::RequireCarping POD (except, of course that it no
longer says that).
Some tests added to RequireCarping.run to exercise the new code, and
(glory be!) Changes updated to say in general what was done.
Tom Wyant [Fri, 16 Apr 2010 05:48:57 +0000 (05:48 +0000)]
RT #56627: Too many arguments (sub prototype, false positive)
If the subroutine had a prototype, the previous code computed the number
of arguments as the number of characters in the prototype, less two for
the parens. The submitted case had embedded whitespace, which is not
usual, but other characters (semicolons, backslashes, square brackets)
also trigger the problem. The fix was to use tr/// to count the
characters that actually represent arguments.
Jeffrey Ryan Thalhammer [Tue, 23 Mar 2010 03:08:09 +0000 (03:08 +0000)]
'warnings' pragma was declared as dependency twice.
Jeffrey Ryan Thalhammer [Mon, 22 Mar 2010 02:21:49 +0000 (02:21 +0000)]
Don't generate test file for 20_policy_require_interpolation_of_metachars.t.
Jeffrey Ryan Thalhammer [Mon, 22 Mar 2010 01:17:38 +0000 (01:17 +0000)]
Bumped version number to 1.105_03.