From: Joel S. <Joe...@ag...> - 2002-08-27 14:39:37
|
Hi. The Net::LDAP::LDIF::new sub die when you want to open a LDIF file through an external process by using the '...|' notation, because this sub automagically adds a character to the file name. I know that the caller can open itself the process, then pass the filehandle, but I think it's better to do it in the sub. This small patch use the plain file name from the caller if the first or the last character is a pipe. Jo=EBl Saunier *** LDIF.pm.orig Tue Aug 27 16:37:56 2002 --- LDIF.pm Tue Aug 27 16:40:00 2002 *************** *** 37,42 **** --- 37,43 ---- require Symbol; $fh =3D Symbol::gensym(); my $open =3D ($mode{$mode} || "<") . $file; + $open =3D $file if ($file =3D~ /^\|/ or $file =3D~ /\|$/); open($fh,$open) or return; $opened_fh =3D 1; } |