Apache::Wyrd::Services::MetaTable

Apache::Wyrd::Services::MetaTable is a MySQL-backed Namespace-based data store.
Download

Apache::Wyrd::Services::MetaTable Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Barry King
  • Publisher web site:
  • http://search.cpan.org/~wyrd/Apache-Wyrd-0.98/Wyrd/Services/CodeRing.pm

Apache::Wyrd::Services::MetaTable Tags


Apache::Wyrd::Services::MetaTable Description

Apache::Wyrd::Services::MetaTable is a MySQL-backed Namespace-based data store. Apache::Wyrd::Services::MetaTable is a MySQL-backed Namespace-based data store.SYNOPSIS use base qw(Apache::Wyrd); use Apache::Wyrd::Services::MetaTable; my $mt = Apache::Wyrd::Services::MetaTable->new($self->dbl->dbh); my $lastrun = $mt->lastrun; ... do something with $lastrun value ... my $thisrun = `localtime` $mt->lastrun($thisrun);MetaTable is an SQL-backed version of Apache::Wyrd::Services::Tree in terms of functionality, but is persistent across connections, as it stores its data in a MySQL server.It can store hashes, arrays, and scalars. Pass the first two as references, the scalars as single values. It uses the namespace of the caller to decide the lookup key, so only the base name of the key need be specified, by referring to $meta_table->valuename (where $metatable stores a reference to an instance of this class). To retreive the value of 'valuename', call the method valuename(). To set it, call the method with a single argument.Be careful to dispose the MetaTable handler properly across connections, or you run the risk of "leaking" database handles into your Apache memory space. The best way to avoid this is to invoke the MetaTable into a scoped lexical only.METHODnew(dbh handle, scalar name)invoke a new MetaTable. The dbh handle connection must have create and insert rights on the database. The name is optional, and defaults to _wyrd_meta. Requirements: · Perl


Apache::Wyrd::Services::MetaTable Related Software