new creates a new database reference object (and, if the database does not exist, also the physical database). Usually called only from WE::DB (see there). Parameters are: the $root object (a WE::DB object) and the filename for the underlying database (here, it is MLDBM).

The type of the database (dbm) implementation, e.g. DB_File (the default) or GDBM_File. Note that other databases than DB_File or GDBM_File have length restrictions, making them unsuitable for using with WE::DB::Obj. However, the CPAN module MLDBM::Sync::SDBM_File workaround the deficiency of the 1K size limit in the standard SDBM_File database.

If true, connects to the database while constructing the object. Otherwise the connection will be made automatically before each operation. Also, the methods connect and disconnect can be used for connecting and disconnecting from the database.

Normally, long running processes (servers or mod_perl processes) should specify -connect => 0 and use the auto-connection feature or manually connect()/disconnect(). So database changes are propagated immediately.

Remove the object $obj_id and all links to this object uncoditionally.

If -links => "unhandled" is specified, then links to this object won't get removed. This is dangerous, and needs an additional we_fsck run afterwards. This option is useful if a mass-delete should be done.

-content: a string to the content or
-file: the filename for the content
-parent: the id of the parent

Other arguments will be used as attributes for the object, e.g. -ContentType will be used as the ContentType attribute and -Title as the title attribute. Note that these attributes are typically starting with an uppercase letter.

Copies the object identified by $object_id to the folder identified by $folder_id. Both the object metadata and the content are copied. Folders are copied by default recursively. To only copy the folder object, use -recursive => 0 in the %args parameter hash.

Return the copied object. If there is a recursive copy, then return a list of copied objects. In this list, the first object is the copied top folder. In scalar context, always return only the first (or only) copied object.

Normally, the version number is just incremented (e.g. from 1.0 to 1.1). If you like, you can specify another version number. There are no checks for valid version numbers (that is, you can specify more than one number, invalid formatted version numbers etc). -version is an alias for -number.

Check out the object with the version number $version_number. If version number is not given, then check out the latest version. If the version number is not given and there are no versions at all, then an exception will be thrown. Please note that a check out will override the current object, so you probably should do a ci first. No locking is done (yet).

Move the object with $object_id and linked to the parent $parent_id to another position or destination. If $parent_id is undef, then the first found parent is used. If there are multiple parents, then it is better to specify the right one. The %args portion may look like this:

Return the object id for the matching "pathname". There are no real pathnames in the WE_Framework, so a dummy pathname is constructed by the titles (english, if there are multiple). PATH_SEP is used as the path separator.

If $parent_obj is given as a object, then the given pathname should be only a partial path starting from this parent object.