Skip to content

Commit

Permalink
Release 0.02
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 12, 2019
1 parent 0b73c7e commit f8f8b57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,6 +1,6 @@
Revision history for File-Open-NoCache-ReadOnly

0.02
0.02 Mon 12 Aug 08:39:30 EDT 2019
Added the fatal option to new()
Aim better for sequential read once
Added close() method
Expand Down
17 changes: 10 additions & 7 deletions README.md
Expand Up @@ -4,15 +4,16 @@ File::Open::NoCache::ReadOnly - Open a file and clear the cache afterward

# VERSION

Version 0.01
Version 0.02

# SUBROUTINES/METHODS

## new

Open a file and flush the cache afterwards.
Open a file that will be read once sequentially and not again,
optimising the cache accordingly.
One use case is building a large database from smaller files that are
only read in once.
only read in once,
Once the file has been used it's a waste of RAM to keep it in cache.

use File::Open::NoCache::ReadOnly;
Expand All @@ -26,6 +27,12 @@ Returns the file descriptor of the file
my $fd = $fh->fd();
my $line = <$fd>;

## close

Shouldn't be needed as close happens automatically when there variable goes out of scope.
However Perl isn't as good at reaping as it'd have you believe, so this is here to force it when you
know you're finished with the object.

# AUTHOR

Nigel Horne, `<njh at bandsman.co.uk>`
Expand All @@ -51,10 +58,6 @@ You can also look for information at:

[http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Open-NoCache-ReadOnly](http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Open-NoCache-ReadOnly)

- AnnoCPAN: Annotated CPAN documentation

[http://annocpan.org/dist/File-Open-NoCache-ReadOnly](http://annocpan.org/dist/File-Open-NoCache-ReadOnly)

- CPAN Ratings

[http://cpanratings.perl.org/d/File-Open-NoCache-ReadOnly](http://cpanratings.perl.org/d/File-Open-NoCache-ReadOnly)
Expand Down
8 changes: 2 additions & 6 deletions lib/File/Open/NoCache/ReadOnly.pm
Expand Up @@ -21,11 +21,11 @@ File::Open::NoCache::ReadOnly - Open a file and clear the cache afterward
=head1 VERSION
Version 0.01
Version 0.02
=cut

our $VERSION = '0.01';
our $VERSION = '0.02';

=head1 SUBROUTINES/METHODS
Expand Down Expand Up @@ -153,10 +153,6 @@ You can also look for information at:
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Open-NoCache-ReadOnly>
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/File-Open-NoCache-ReadOnly>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/File-Open-NoCache-ReadOnly>
Expand Down

0 comments on commit f8f8b57

Please sign in to comment.