[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Using UNIX style filenames with MacPerl



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Transfer-Encoding: quoted-printable

At 2:56 PM +0200 5/13/98, Gerald Young wrote:

} Just a spark:
}
} Would it be possible to "teach" MacPerl to directly support the
} UNIX-style file and pathnames when accessing files.

No.  It would be a terrible idea.  Suppose I had a folder named "5/13/98",
or one named "..".  What would you want MacPerl to do in this case?

}
} Rationale: It is rather annoying to dig and hunt for all those numerous
} occurences of "/" or lack of "/" in filenames and change all to ":" or
} whatever.

Life is sometimes annoying.  You might want to look at the File::Spec
module for some primitive ways of dealing with the problem.

It'd be more annoying to me to have to avoid using / in Mac file names.

}
} Under the (false) assumption a pathname is really a list of durectory
} names spererated by "/" this would give the same (false) view of a file
} in the filesystems as an FTP URI.

URL's, however, have ways of dealing with this problem, by encoding: %2f,
%2d%2d.  But standard Unix pathnames don't.  Unix "anything but a / or
named . or .." directly conflicts with Mac "anything but a :".  Not much
can be done.  I agree that adding the ability to open URL's, including
file: URL's, might be a nice addition to Perl in general.

}
} And would give more portable perl scripts (while sacrificing the
} Macintosh way or even cementing the UNIX stylisms of pathnames instead of
} some "intelligent" meta description).
}
} Similar stuff is implemented with Metrowerks Codewarrior, Access Path
} setting; under (checkbox) option "Use DOS and UNIX pathnames" (or
} similar).
}
} Is such a feature useful?
}
} (And how can one simulate the "make; make test; make instal" of the usual
} CPAN package installations=8A)

You don't.  Check the appropriate chapter in "MacPerl: Power and Ease"
<http://www.ptf.com/macperl/ptf_book/HTML > for workarounds.

}
} Comments?
} -- Gerald


- -----
Paul J. Schinder
schinder@pobox.com

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBNVmhIVZaVc52j0XhEQJ3WgCcChtIx5KsPxG4ozR+rh3RXXlsNSoAmwfE
RRld7fZK6CE+QmpJO0cREGPv
=yqQM
-----END PGP SIGNATURE-----

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch