diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-08 14:23:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-08 14:23:39 +0000 |
commit | 8b793558e1d0f24b679aa104778fd6c346ee9c2d (patch) | |
tree | a6ebb95d6b5f6006dd27e224a665ef0c456c86cd /ext/Storable | |
parent | 2e5b8131f17dadef0010bf74278b0000d9972dd4 (diff) | |
download | perl-8b793558e1d0f24b679aa104778fd6c346ee9c2d.tar.gz |
Enchance the Storable magic description.
p4raw-id: //depot/perl@14133
Diffstat (limited to 'ext/Storable')
-rw-r--r-- | ext/Storable/Storable.pm | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index 353c999ddf..869f5b66df 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -133,22 +133,19 @@ sub show_file_magic { # To recognize the data files of the Perl module Storable, # the following lines need to be added to the local magic(5) file, # usually either /usr/share/misc/magic or /etc/magic. -# Note the couple of unportable lines, consult your operating -# system's documentation whether you can use those lines. # 0 string perl-store perl Storable(v0.6) data ->1 byte &01 (network-ordered) +>4 byte >0 (net-order %d) +>>4 byte &01 (network-ordered) +>>4 byte =3 (major 1) +>>4 byte =2 (major 1) + 0 string pst0 perl Storable(v0.7) data -# byte&04 unportable syntax ->4 byte&04 =4 ->>5 byte >0 v2.%d ->4 byte &01 (network-ordered) -# byte&01 unportable syntax ->4 byte&01 =0 (local-ordered) ->>6 byte >0 (sizeof int %d) ->>7 byte >0 (sizeof long %d) ->>8 byte >0 (sizeof ptr %d) ->>9 byte >0 (sizeof NV %d) +>4 byte >0 +>>4 byte &01 (network-ordered) +>>4 byte =5 (major 2) +>>4 byte =4 (major 2) +>>5 byte >0 (minor %d) EOM } @@ -704,12 +701,15 @@ support Storable hooks to redefine the way deep cloning is performed. Yes, there's a lot of that :-) But more precisely, in UNIX systems there's a utility called C<file>, which recognizes data files based on their contents (usually their first few bytes). For this to work, -a certain file called "magic" needs to taught about the "signature" +a certain file called F<magic> needs to taught about the I<signature> of the data. Where that configuration file lives depends on the UNIX flavour, often it's something like F</usr/share/misc/magic> or -F</etc/magic>. Your system administrator needs to do the updating. -The necessary signature information is output to stdout by -invoking Storable::show_file_magic(). +F</etc/magic>. Your system administrator needs to do the updating of +the F<magic> file. The necessary signature information is output to +stdout by invoking Storable::show_file_magic(). Note that the open +source implementation of the C<file> utility 3.38 (or later) +is expected to contain the support for recognising Storable files, +in addition to other kinds of Perl files. =head1 EXAMPLES |