1Dpkg::Interface::Storable(3perl) libdpkg-perl Dpkg::Interface::Storable(3perl)
2
3
4
6 Dpkg::Interface::Storable - common methods related to object
7 serialization
8
10 Dpkg::Interface::Storable is only meant to be used as parent class for
11 other classes. It provides common methods that are all implemented on
12 top of two basic methods parse() and output().
13
15 Those methods must be provided by the class that wish to inherit from
16 Dpkg::Interface::Storable so that the methods provided can work.
17
18 $obj->parse($fh[, $desc])
19 This methods initialize the object with the data stored in the
20 filehandle. $desc is optional and is a textual description of the
21 filehandle used in error messages.
22
23 $string = $obj->output([$fh])
24 This method returns a string representation of the object in
25 $string and it writes the same string to $fh (if it's defined).
26
28 $obj->load($filename, %opts)
29 Initialize the object with the data stored in the file. The file
30 can be compressed, it will be decompressed on the fly by using a
31 Dpkg::Compression::FileHandle object. If $opts{compression} is
32 false the decompression support will be disabled. If $filename is
33 "-", then the standard input is read (no compression is allowed in
34 that case).
35
36 $obj->save($filename, %opts)
37 Store the object in the file. If the filename ends with a known
38 compression extension, it will be compressed on the fly by using a
39 Dpkg::Compression::FileHandle object. If $opts{compression} is
40 false the compression support will be disabled. If $filename is
41 "-", then the standard output is used (data are written
42 uncompressed in that case).
43
44 "$obj"
45 Return a string representation of the object.
46
48 Version 1.01 (dpkg 1.19.0)
49 New options: The $obj->load() and $obj->save() methods support a new
50 compression option.
51
52 Version 1.00 (dpkg 1.15.6)
53 Mark the module as public.
54
55
56
571.20.9 2021-07-21 Dpkg::Interface::Storable(3perl)