Skip Menu |

This queue is for tickets about the App-PipeFilter CPAN distribution.

Report information
The Basics
Id: 76837
Status: resolved
Priority: 0/
Queue: App-PipeFilter

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

Bug Information
Severity: Important
Broken in:
  • 0.003
  • 0.004
Fixed in: (no value)



Subject: Hard-coded paths to system commands specified in App::PipeFilter::JsonSort
The package App::PipeFilter::JsonSort contains a hard-coded reference to the system sort command, "/usr/bin/sort" (line 42) This doesn't match up with the actual path for my system and causes the following error when run: sh: /usr/bin/sort: No such file or directory This is also true for the cut command a few lines later "/usr/bin/cut" (line 46). Please can these be changed to use the the commands as found in the system PATH; so changing it to "/usr/bin/env sort" or just "sort" and "/usr/bin/env cut" or "cut"? Additionally, if these commands could be made configurable via a couple of additional attributes, for example: has sort_cmd => ( is => 'ro', isa => 'Str', default => 'sort' ); has cut_cmd => ( is => 'ro', isa => 'Str', default => 'cut' );
Thanks for the bug report. I hope this will be resolved to your liking in the next release: commit a5038ba147d7f9a2663e342ea7e0654d296b890c Author: Rocco Caputo <rcaputo@cpan.org> Date: Sun Apr 29 17:12:51 2012 -0400 [rt.cpan.org 76837] Un-hardcode sort(1) and cut(1) paths for jsort. Peter P. Hallam pointed out that my hardcoded /usr/bin/sort and /usr/bin/cut weren't universal. I added a little path search with fallbacks to /usr/bin/env {sort,cut}. It's still not non-UNIX safe, of course, but I'm hoping I'll get patches for other systems.