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

Perlcritic reports problem when evaluating a file with embedded form feed chars. #419

Closed
thaljef opened this issue Nov 1, 2013 · 4 comments

Comments

@thaljef
Copy link
Member

thaljef commented Nov 1, 2013

RT Ticket: http://rt.cpan.org/Ticket/Display.html?id=67491
Requested On: Fri Apr 15 06:59:30 2011
Requested By: Scott.Stricker@NGC.com


Just reinstalled Activestate perl and am running perlcritic 1.115 in an activestate perl 5.12.3 (1204) on a windows xp pro SP3 machine.
I run perlcritic against a perl script with raw form feeds (12) in it and get the following...
Problem while critiquing "C:\h\HCS\website\COF_Root\Scripts\Region_Map_OL.pl": Can't parse code: Encountered unexpected character '12'
Added the FF characters to paginate the file when printed.
Also, just as an FYI, after reloading activestate perl, when I ran perlcritic, I was told that the following modules were missing
String-format
Perl-tidy
Pod-spell
PPix-regex
Was surprised that they did not come bundled to support perlcritic. I'll do some digging and see if I can also pass the word to the activestate folks.

Thanks

E. Scott Stricker

@thaljef
Copy link
Member Author

thaljef commented Nov 1, 2013

RT Ticket: http://rt.cpan.org/Ticket/Display.html?id=67491
Comment On: 2011-04-15 16:24:07
Comment By: wyant@cpan.org


On Fri Apr 15 09:59:30 2011, stricsc wrote:

Just reinstalled Activestate perl and am running perlcritic 1.115 in
an activestate perl 5.12.3 (1204) on a windows xp pro SP3 machine.
I run perlcritic against a perl script with raw form feeds (12) in it
and get the following...
Problem while critiquing
"C:\h\HCS\website\COF_Root\Scripts\Region_Map_OL.pl": Can't parse
code: Encountered unexpected character '12'
Added the FF characters to paginate the file when printed.
Also, just as an FYI, after reloading activestate perl, when I ran
perlcritic, I was told that the following modules were missing
String-format
Perl-tidy
Pod-spell
PPix-regex
Was surprised that they did not come bundled to support perlcritic.
I'll do some digging and see if I can also pass the word to the
activestate folks.

Thanks

E. Scott Stricker

I can not duplicate this failure, at least not so far. How relevant this
is, given that I have neither ActivePerl nor Windows XP, is not clear
(it's Perl Perl so to speak, and Mac OS X).

On the presumption that it matters where the form feeds go, can you
possibly provide a failing file?

Also: can you confirm the version of the Perl PPI module you have
installed? Say, with

perl -MPPI -E "say PPI->VERSION"

I have no idea what is going on with the missing dependencies. Speaking
pedantically, there is no such package as (for instance) Perl-tidy,
since case is important. I have not yet figured out how, without
ActivePerl, to download an individual PPM package, but the package.xml
file for Windows and Perl 5.12 seems to include all the missing packages
as dependencies, with the correct case.

You will know if the missing packages are truly missing, because
perlcritic will die horribly when trying to execute policies that use
them, even when criticizing files without form feeds. If they are really
not there, you should be able to get going by simply installing them.

Tom Wyant

@moregan
Copy link
Contributor

moregan commented Mar 12, 2014

The formfeed problem has been addresed in PPI and should be fixed in the 1.216 release.

@moregan
Copy link
Contributor

moregan commented Sep 2, 2014

P::C 1.116 with PPI 1.215 on my file ff_test:

xxd ff
0000000: 6d79 2024 7820 3d20 0c20 313b 0a         my $x = . 1;.

produces: "Problem while critiquing "ff_test": Can't parse code: Encountered unexpected character '12'" The same file with P:CC 1.122 and PPI 1.218 does not produce the formfeed warning.

@thaljef
Copy link
Member Author

thaljef commented Nov 16, 2014

The same file with P:CC 1.122 and PPI 1.218 does not produce the formfeed warning.

Looks like this has been resolved for a while then. Closing.

@thaljef thaljef closed this as completed Nov 16, 2014
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

2 participants