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

NAME

Data::Beacon::DBI - Stores a BEACON in a database

DESCRIPTION

This class is a subclass of Data::Beacon. Each instance is connected to a specific Beacon collection as Data::Beacon::Collection::DBI.

The current version is just a draft.

METHODS

new ( $collection, $name )

...may return undef...

meta ( [ $key [ => $value [ ... ] ] ] )

Get and/or set one or more meta fields. Returns a hash (no arguments), or string or undef (one argument), or croaks on invalid arguments.

metafields

Return all meta fields, serialized and sorted as string. This method is derived from Data::Beacon.

count

Returns the number of links in this Beacon, or zero.

line

Always returns zero.

lasterror

Returns the last error message (if any). This method is derived from Data::Beacon.

errors

Returns the current number of errors or zero.

parse ( { handler => coderef } )

Iterate over all links. You can pass a link handler, and/or an error handler.

Return the next link when iterating (as array reference), or undef.

Returns the last valid link, that has been read. Implemented in Data::Beacon.

query ( $source )

TODO

INTERNAL METHODS

_init

Expand an link with PREFIX and TARGET, if given. Does not call meta but uses the cached meta values. Returns an array instead of an array reference!

TODO: Should be moved to Data::Beacon.

FUTURE METHODS

The following methods are not implemented yet.

Add links.

Insert, replace or remove links.

AUTHOR

Jakob Voss <jakob.voss@gbv.de>

LICENSE

Copyright (C) 2010 by Verbundzentrale Goettingen (VZG) and Jakob Voss

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

In addition you may fork this library under the terms of the GNU Affero General Public License.