ObjStore::NoInit - 'use ObjStore', but Delay Initialization


ObjStore documentation Contained in the ObjStore distribution.

Index


Code Index:

NAME

Top

ObjStore::NoInit - 'use ObjStore', but Delay Initialization

SYNOPSIS

Top

    #use ObjStore qw(import list);
    use ObjStore::NoInit qw(import list);

DESCRIPTION

Top

We go through hoops to make it easy for newbies. Use this module if you need to do something fancy. Here is a list of fancies:

* $ObjStore::CACHE_SIZE
* $ObjStore::CLIENT_NAME
* $ObjStore::SCHEMA_DB

Some of these variables can also be set via environment variables.


ObjStore documentation Contained in the ObjStore distribution.

use strict;
package ObjStore::NoInit;
use Carp;
use vars qw($INIT_DELAYED);
$INIT_DELAYED = 1;

sub import {
    carp "ObjStore::NoInit used too late" if $ObjStore::INITIALIZED;
    shift;
    require ObjStore;
    ObjStore->export(scalar caller(0), @_);
}

sub VERSION {
    carp "ObjStore::NoInit used too late" if $ObjStore::INITIALIZED;
    shift;
    require ObjStore;
    ObjStore->VERSION(@_);
}

1;