Why do you use such strange file names anyway?

Is not me, is the users. And my application shouldn't care about renaming files. Anyway, Perl can handle it.

Regarding the diffs, I'll do that for next time.


On Nov 9, 2005, at 8:25 AM, Gisle Aas wrote:

Alexis Marrero <[EMAIL PROTECTED]> writes:


This is to report a change that I had to do in the LWP code to avoid
"Can't open file...."
Notice line 144.

Originally:
    142                  require Symbol;
    143                  my $fh = Symbol::gensym();
    144                  open($fh, $file) or Carp::croak("Can't open
file $file: $!");
    145                  binmode($fh);

After changes:

    142                  require Symbol;
    143                  my $fh = Symbol::gensym();
    144                  open($fh, '<', $file) or Carp::croak("Can't
open file $file: $!");
    145                  binmode($fh);

Opening files with chars in filename like [\r<>\t], among others,
with 2 arguments raises the exception. With three arguments issues
are gone. More information on Perl Cookbook 7.2


Only problem here is that this breaks compatibility with perl-5.005,
which LWP still claims to support.  Perhaps it's time to give it up.
Why do you use such strange file names anyway?

BTW, the standard way to show what needs to change in source code is
to provide the output of 'diff -u <oldfile> <newfile>'.  These patches
are much easier to read and also allow them to be applied directly
with the 'patch' program.

Regards,
Gisle


Reply via email to