Skip Menu |

This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id: 48954
Status: resolved
Priority: 0/
Queue: Text-CSV_XS

People
Owner: Nobody in particular
Requestors: clh [...] pobox.com
Cc:
AdminCc:

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



Subject: Example: csv2xls v1.6
Date: Sun, 23 Aug 2009 20:51:18 -0500
To: bug-Text-CSV_XS [...] rt.cpan.org
From: Chap Harrison <clh [...] pobox.com>
Hi, Just a minor nit: I copied the example program csv2xls into my current directory (and gave it that name), and then ran ./csv2xls, with no arguments. It then offered to overwrite 'csv2xls'! my $title = @ARGV && -f $ARGV[0] ? $ARGV[0] : "csv2xls"; ($xls ||= $title) =~ s/\.csv$/.xls/; Should default $title be "csv2xls.xls", as stated in usage()? Glad it asked for permission, though! :-) csv2xls v1.6 Text-CSV_XS-0.67 Perl v5.8.8 Darwin Chief.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 Regards, Chap Harrison
Subject: Re: [rt.cpan.org #48954] Example: csv2xls v1.6
Date: Mon, 24 Aug 2009 08:11:22 +0200
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Sun, 23 Aug 2009 21:51:53 -0400, "Chap Harrison via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> Just a minor nit: I copied the example program csv2xls into my current > directory (and gave it that name), and then ran ./csv2xls, with no > arguments. It then offered to overwrite 'csv2xls'! > > my $title = @ARGV && -f $ARGV[0] ? $ARGV[0] : "csv2xls"; > ($xls ||= $title) =~ s/\.csv$/.xls/; > Should default $title be "csv2xls.xls", as stated in usage()?
No, the title is what appears as title, hence the name :) But I've changes the regex like this: --8<--- my $title = @ARGV && -f $ARGV[0] ? $ARGV[0] : "csv2xls"; ($xls ||= $title) =~ s/(?:\.csv)?$/.xls/i; -->8--- -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/