ACME-QuoteDB
view release on metacpan or search on metacpan
lib/ACME/QuoteDB.pm view on Meta::CPAN
# have to set this to use remote database
$ENV{ACME_QUOTEDB_REMOTE} = 'mysql';
$ENV{ACME_QUOTEDB_DB} = 'acme_quotedb';
$ENV{ACME_QUOTEDB_HOST} = 'localhost';
$ENV{ACME_QUOTEDB_USER} = 'acme_user';
$ENV{ACME_QUOTEDB_PASS} = 'acme';
}
Set the above in a begin block.
The database connection is transparent.
Module usage wise, all operations are the same but now
you will be writing to the remote mysql database specified.
(The user will need read/write permissions to the db/tables)
(mysql admin duties are beyond the scope of this module)
The only supported databases at this time are sqlite and mysql.
It is trivial to add support for others
lib/ACME/QuoteDB/LoadDB.pm view on Meta::CPAN
=head2 debug_record
dump record (show what is set on the internal data structure)
e.g. Data::Dumper
=head2 set_record
only needed it one plans to sub-class this module.
otherwise, is transparent in usage.
if you are sub-classing this module, you would have to populate
this record. (L</write_record> knows about/uses this data structure)
possible fields consist of:
$self->set_record(quote => q{});
$self->set_record(rating => q{});
$self->set_record(name => q{});
$self->set_record(source => q{});
lib/ACME/QuoteDB/LoadDB.pm view on Meta::CPAN
# or this even
$self->set_record({
name => $name,
source => $source
});
=head2 get_record
only useful it one plans to sub-class this module.
otherwise, is transparent in usage.
if you are sub-classing this module, you would have to populate
this record. [see L</set_record>]
(L</write_record> knows about/uses this data structure)
possible fields consist of:
$self->get_record('quote');
$self->get_record('rating');
t/data/python_quotes.txt view on Meta::CPAN
-- GvR, 13 Jun 2001
"Maybe we also have a smaller brain than the typical Lisper -- I would say,
that would make us more normal, and if Python caters to people with a
closer-to-average brain size, that would mean more people will be able to
program in Python. History will decide..."
"I thought it already has, pretty much."
-- GvR and A.M. Kuchling, 14 Jun 2001
Did Guido use the time machine to get a copy of the GoF book before he started
working on the first version of Python, or are Patterns just a transparent
attempt to cover for chronically inexpressive languages like C++ and Java which
can't generally implement these mind-numbingly simple constructs in code?
-- Glyph Lefkowitz, 7 Jun 2001
Google confuses me; if you search for "michael hudson" my page is the third hit
-- but my name doesn't actually appear anywhere on the linked page! The "did
you mean to search for..." feature is also downright uncanny. They've clearly
sold their souls to the devil -- there's no other explanation.
-- Michael Hudson, 28 Jun 2001
( run in 0.284 second using v1.01-cache-2.11-cpan-a5abf4f5562 )