Skip Menu |

This queue is for tickets about the Syntax-Highlight-Perl CPAN distribution.

Report information
The Basics
Id: 66524
Status: new
Priority: 0/
Queue: Syntax-Highlight-Perl

People
Owner: Nobody in particular
Requestors: chm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.0
Fixed in: (no value)



Subject: viewperl broken for recent Getopt::Long
Running the viewperl program on a simple file of 1 line outputs the following error: viewperl xxxx Not a SCALAR reference at /cygdrive/f/perl/usr/bin/viewperl~ line 222. The problem is that Getopt::Long has changed its return values: In version 2.37 the first argument to the callback function was changed from string to object. This was done to make room for extensions and more detailed control. The object stringifies to the option name so this change should not introduce compatibility problems. The fix in this case is to modify the call to GetOptions for the '<>' sub to either use $_[1] instead of $_[0] and require Getopt::Long version 2.37 or greater, or (more compatibly) just put "'s around the $_[0] the sub to use the stringify feature so that the ref() at line 222 returns the expected results.