Skip to content

Commit

Permalink
The basis of changes I'd like to make to IO spec
Browse files Browse the repository at this point in the history
- Str.IO gives an IO::Path that only does absolutifying paths *once*
- IO::Path gets a caching "isDir" and "exists" attribute
- IO::Path.lines/words open/close handle from IO::Path.path
- IO::Handle.lines/words give lines / words from current file position
- $*SPEC contains the appropriate IO::Spec::filesystem object
- IO::Path gets a $.SPEC from a given IO::Spec object, default to $*SPEC
- IO::Path.methods become wrappers around $!SPEC rather than $.SPEC

This should allow for better optimizations (e.g. doing rel2abs only *once*)
and for better resource usage (e.g having .lines/words close handles).
This should also make all filetest methods much faster.
  • Loading branch information
lizmat committed Sep 20, 2014
1 parent 1c17220 commit 8d48f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions S32-setting-library/Str.pod
Expand Up @@ -556,11 +556,11 @@ original string, and the proviso about empty lines.

=item IO

Returns an unopened IO::Handle, using the string as the file path.
Returns an IO::Path, using the string as the file path.

=item path

Returns an IO::Path, using the string as the file path.
A deprecated form of C<IO>.

=item succ

Expand Down

0 comments on commit 8d48f69

Please sign in to comment.