123 lines
3.1 KiB
HTML
123 lines
3.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Dpkg::Interface::Storable</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Dpkg::Interface::Storable</H1>
|
|
Section: libdpkg-perl (3perl)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Dpkg::Interface::Storable - common methods related to object serialization
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
Dpkg::Interface::Storable is only meant to be used as parent
|
|
class for other objects. It provides common methods that are
|
|
all implemented on top of two basic methods <B>parse()</B> and <B>output()</B>.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>BASE METHODS</H2>
|
|
|
|
|
|
|
|
Those methods must be provided by the object that wish to inherit
|
|
from Dpkg::Interface::Storable so that the methods provided can work.
|
|
<DL COMPACT>
|
|
<DT id="1">$obj->parse($fh[, $desc])<DD>
|
|
|
|
|
|
|
|
|
|
This methods initialize the object with the data stored in the
|
|
filehandle. <TT>$desc</TT> is optional and is a textual description of
|
|
the filehandle used in error messages.
|
|
<DT id="2">$string = $obj->output([$fh])<DD>
|
|
|
|
|
|
|
|
|
|
This method returns a string representation of the object in <TT>$string</TT>
|
|
and it writes the same string to <TT>$fh</TT> (if it's defined).
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>PROVIDED METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="3">$obj->load($filename, %opts)<DD>
|
|
|
|
|
|
|
|
|
|
Initialize the object with the data stored in the file. The file can be
|
|
compressed, it will be decompressed on the fly by using a
|
|
Dpkg::Compression::FileHandle object. If <TT>$opts</TT>{compression} is false the
|
|
decompression support will be disabled. If <TT>$filename</TT> is ``-'', then the
|
|
standard input is read (no compression is allowed in that case).
|
|
<DT id="4">$obj->save($filename, %opts)<DD>
|
|
|
|
|
|
|
|
|
|
Store the object in the file. If the filename ends with a known
|
|
compression extension, it will be compressed on the fly by using a
|
|
Dpkg::Compression::FileHandle object. If <TT>$opts</TT>{compression} is false the
|
|
compression support will be disabled. If <TT>$filename</TT> is ``-'', then the
|
|
standard output is used (data are written uncompressed in that case).
|
|
<DT id="5">"$obj"<DD>
|
|
|
|
|
|
|
|
|
|
Return a string representation of the object.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CHANGES</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Version 1.01 (dpkg 1.19.0)</H3>
|
|
|
|
|
|
|
|
New options: The <TT>$obj</TT>-><B>load()</B> and <TT>$obj</TT>-><B>save()</B> methods support a new
|
|
compression option.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Version 1.00 (dpkg 1.15.6)</H3>
|
|
|
|
|
|
|
|
Mark the module as public.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">BASE METHODS</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">PROVIDED METHODS</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">CHANGES</A><DD>
|
|
<DL>
|
|
<DT id="11"><A HREF="#lbAG">Version 1.01 (dpkg 1.19.0)</A><DD>
|
|
<DT id="12"><A HREF="#lbAH">Version 1.00 (dpkg 1.15.6)</A><DD>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:39 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|