The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Hub::Data::HashFile - Flat file data which supports nested perl structures.

Part of the Hub Library

SYNOPSIS

    use Hub;
    my $hf = Hub::mkinst('HashFile','myfile.hf');

    $hf->set( "eye_color", "green" );   # set a simple property
    $hf->save();                        # saves the file to disk

DESCRIPTION

HashFiles are used for property files and small databases.

There will be one and only one HashFile instance for each file. If a second HashFile instance is created and is asked to load a file which is already represented, this second instance is replaced with a reference to the first.

METHODS

clear getTimestamp load refresh setRoot
data get_root mergein save writeToDisk
data_hash hffmt new saveCopy
format hfsync print set
get include readFromDisk setOption
clear

data

                           D E P R I C A T E D
data_hash

depricated, please use method data()

format

get

getTimestamp

get_root

depricated, please use method data()

hffmt

Static methods

hfsync

Sync all modified instances to disk

include

load

Read and parse the file from disk.

This is a singleton per filename.

mergein

new

print

readFromDisk

refresh

 Usage: refresh

Sync disk data into ourselves Hub object method

save

saveCopy

set

setOption

 Usage: setOption KEY VALUE

Sets an option for this instance.

KEY can be:

  preserve_comments           0 or 1, We will write out comments


  backup                      Set the number of backups you want to keep


  write_behind                0 or 1, Do not write to disk on save() but mark
                              it as dirty, and defer to the hfsync() method.
setRoot

writeToDisk

INTERNAL

AUTOLOAD DESTROY _init
AUTOLOAD

 Usage: AUTOLOAD

Data handlers: getv takev setv appendv

DESTROY

 Usage: DESTROY

Defining this function prevents it from being searched in AUTOLOAD

_init

AUTHOR

Ryan Gies

COPYRIGHT

Copyright (c) 2006 Livesite Networks, LLC. All rights reserved.

Copyright (c) 2000-2005 Ryan Gies. All rights reserved.

UPDATED

This file created by mkdocs.pl on 8/29/2006 at 2:07pm