Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 7701
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: smueller [...] cpan.org
Requestors: Konstantin [...] Tokar.RU
Cc:
AdminCc:

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



Date: Sun, 19 Sep 2004 23:48:32 +0400
From: Konstantin Tokar <Konstantin [...] Tokar.RU>
To: bug-par [...] rt.cpan.org
Subject: -T check error in PAR::Packer
hi, bug-par. In function _check_perl(), check -T raise error, if input file contains russian comments. sub _check_perl { my ($self, $file) = @_; return if ($self->_check_par($file)); Show quoted text
>>>>> unless (-T $file) {
$self->_warn("Binary '$file' sure doesn't smell like perl source!\n"); if (my $file_checker = $self->_can_run("file")) { $self->_vprint(0, "Checking file type... "); system($file_checker, $file); } $self->_die("Please try a perlier file!\n"); } Example: D:\>pp a.pl C:\Perl\bin\pp.BAT: Binary 'a.pl' sure doesn't smell like perl source! a.pl: Non-ISO extended-ASCII text, with CRLF line terminators C:\Perl\bin\pp.BAT: Please try a perlier file! -- С уважением, Konstantin Tokar mailto:Konstantin@Tokar.RU

Message body is not shown because sender requested not to inline it.

On So. 19. Sep. 2004, 16:47:50, Konstantin@Tokar.RU wrote: Show quoted text
> hi, bug-par. > > In function _check_perl(), check -T raise error, if input file > contains russian comments. > > sub _check_perl { > my ($self, $file) = @_; > return if ($self->_check_par($file)); >
> >>>>> unless (-T $file) {
> $self->_warn("Binary '$file' sure doesn't smell like perl > source!\n"); > > if (my $file_checker = $self->_can_run("file")) { > $self->_vprint(0, "Checking file type... "); > system($file_checker, $file); > } > $self->_die("Please try a perlier file!\n"); > } > > > Example: > > D:\>pp a.pl > C:\Perl\bin\pp.BAT: Binary 'a.pl' sure doesn't smell like perl source! > a.pl: Non-ISO extended-ASCII text, with CRLF line terminators > C:\Perl\bin\pp.BAT: Please try a perlier file!
Hi, I know this is really, really old. I have only been maintaining PAR for a while and haven't been able to dig through all tickets yet. This error is due to the fact that the builtin file test "-T" (perldoc perlfunc -X) considers your file to be a binary file. This is not a PAR problem. Anyway, I have added a workaround for systems with the "file" tool installed. This will be in PAR 0.94 when it is released. Steffen