™.. FileCache - Online Linux Manual PageSection : 3pm
Updated : 2009-05-05
Source : perl v5.10.1
Note : Perl Programmers Reference Guide

NAMEFileCache − keep more files open than the system permits

SYNOPSIS​ no strict 'refs'; ​ ​ use FileCache; ​ # or ​ use FileCache maxopen => 16; ​ ​ cacheout $mode, $path; ​ # or ​ cacheout $path; ​ print $path @data; ​ ​ $fh = cacheout $mode, $path; ​ # or ​ $fh = cacheout $path; ​ print $fh @data;

DESCRIPTIONThe \*(C`cacheout\*(C'\fR function will make sure that there's a filehandle open for reading or writing available as the pathname you give it. It automatically closes and re-opens files if you exceed your system's maximum number of file descriptors, or the suggested maximum maxopen. cacheout EXPR The 1−argument form of cacheout will open a file for writing ('>') on it's first use, and appending ('>>') thereafter. Returns EXPR on success for convenience. You may neglect the return value and manipulate EXPR as the filehandle directly if you prefer. cacheout MODE, EXPR The 2−argument form of cacheout will use the supplied mode for the initial and subsequent openings. Most valid modes for 3−argument \*(C`open\*(C'\fR are supported namely; '>', '+>', '<', '<+', '>>', ​ '|−' and '−|' To pass supplemental arguments to a program opened with '|−' or '−|' append them to the command string as you would system EXPR. Returns EXPR on success for convenience. You may neglect the return value and manipulate EXPR as the filehandle directly if you prefer.

CAVEATSWhile it is permissible to \*(C`close\*(C'\fR a FileCache managed file, do not do so if you are calling \*(C`FileCache::cacheout\*(C'\fR from a package other than which it was imported, or with another module which overrides \*(C`close\*(C'\fR. If you must, use \*(C`FileCache::cacheout_close\*(C'\fR. Although FileCache can be used with piped opens ('−|' or '|−') doing so is strongly discouraged. If FileCache finds it necessary to close and then reopen a pipe, the command at the far end of the pipe will be reexecuted − the results of performing IO on FileCache'd pipes is unlikely to be what you expect. The ability to use FileCache on pipes may be removed in a future release. FileCache does not store the current file offset if it finds it necessary to close a file. When the file is reopened, the offset will be as specified by the original \*(C`open\*(C'\fR file mode. This could be construed to be a bug. The module functionality relies on symbolic references, so things will break under 'use strict' unless 'no strict refs' is also specified.

BUGSsys/param.h lies with its \*(C`NOFILE\*(C'\fR define on some systems, so you may have to set maxopen yourself.
0
Johanes Gumabo
Data Size   :   9,320 byte
man-FileCache.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 165,754
Visitor ID   :     :  
Visitor IP   :   18.217.26.8   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|FileCache.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|FileCache.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|FileCache.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|FileCache.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|FileCache.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|FileCache.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|FileCache.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|FileCache.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|FileCache.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|FileCache.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|FileCache.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|FileCache.3pm|155|\*(C`cacheout\*(C'\fR function will make sure that there's a filehandle open |The \f(CW\*(C`cacheout\*(C'\fR function will make sure that there's a filehandle open )         (rof_escape_sequence|91|FileCache.3pm|169|\*(C`open\*(C'\fR are supported |and subsequent openings. Most valid modes for 3\-argument \f(CW\*(C`open\*(C'\fR are supported )         (rof_escape_sequence|91|FileCache.3pm|180|\*(C`close\*(C'\fR a FileCache managed file, |While it is permissible to \f(CW\*(C`close\*(C'\fR a FileCache managed file, )         (rof_escape_sequence|91|FileCache.3pm|181|\*(C`FileCache::cacheout\*(C'\fR from a package other |do not do so if you are calling \f(CW\*(C`FileCache::cacheout\*(C'\fR from a package other )         (rof_escape_sequence|91|FileCache.3pm|182|\*(C`close\*(C'\fR. |than which it was imported, or with another module which overrides \f(CW\*(C`close\*(C'\fR. )         (rof_escape_sequence|91|FileCache.3pm|183|\*(C`FileCache::cacheout_close\*(C'\fR. |If you must, use \f(CW\*(C`FileCache::cacheout_close\*(C'\fR. )         (rof_escape_sequence|91|FileCache.3pm|193|\*(C`open\*(C'\fR file mode. This could be construed to be a bug. |original \f(CW\*(C`open\*(C'\fR file mode. This could be construed to be a bug. )         (rof_escape_sequence|91|FileCache.3pm|199|\*(C`NOFILE\*(C'\fR define on some systems, |\&\fIsys/param.h\fR lies with its \f(CW\*(C`NOFILE\*(C'\fR define on some systems, )