ACME-QuoteDB

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


ACME::QuoteDB − API implements CRUD for a Collection of Quotes
(adages/proverbs/sayings/epigrams, etc)

This module provides an easy to use programmitic interface to a data‐
base (sqlite3 or mysql) of ’quotes’.  (any content really, that can fit
into our "defined format")

For simplicty you can think of it as a modern fancy perl version of
fortune (with a management interface, remote database connection sup‐
port, plus additional features and some not (yet) supported)

Supported actions include: (CRUD)

1 Create
    * Adding quote(s)
    * ’Batch’ Loading quotes from a file (stream, other database, etc)

1 Read
    * Displaying a single quote, random or based on some criteria
    * Displaying multiple quotes, based on some criteria

lib/ACME/QuoteDB.pm  view on Meta::CPAN

=head1 DESCRIPTION

This module provides an easy to use programmitic interface 
to a database (sqlite3 or mysql) of 'quotes'.  (any content really, 
that can fit into our L<"defined format"|/"record format">)

For simplicty you can think of it as a modern fancy perl version 
of L<fortune|/fortune> 
(with a management interface, remote database
connection support, 
plus additional features and some not (yet) supported)

Originally, this module was designed for a collection of quotes from a well 
known TV show, once I became aware that distributing it as such would be 
L<copyright infringement|/'copyright infringement'>, I generalized the module, so it can be loaded 
with 'any' content. (in the quote-ish L<format|/"record format">)

=head4 Supported actions include: (CRUD)

=over 4

lib/ACME/QuoteDB.pm  view on Meta::CPAN

I will for sure be encapsulating all data in a future version.
(so, don't have code that does $self->{record}->{name} = 'value', or you won't
be happy down the road). Instead use $self->get_record('name') (getter) or
$self->set_record(name => 'my attrib') (setter)


When we are using a SQLite database backend ('regular' local usage), we 
should probably be using, ORLite instead of Class::DBI 
(although we have not seen any issues yet).

Please report any bugs or feature requests to C<bug-acme-quotedb at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  
I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/DB/Attribution.pm  view on Meta::CPAN

L<ACME::QuoteDB>

L<Class::DBI>

=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-thesimpsonsquotes at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/DB/Category.pm  view on Meta::CPAN

L<ACME::QuoteDB>

L<Class::DBI>

=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-thesimpsonsquotes at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/DB/DBI.pm  view on Meta::CPAN

L<ACME::QuoteDB>;

L<Class::DBI>;

=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-thesimpsonsquotes at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/DB/Quote.pm  view on Meta::CPAN

L<ACME::QuoteDB>

L<Class::DBI>

=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-thesimpsonsquotes at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/DB/QuoteCatg.pm  view on Meta::CPAN

L<ACME::QuoteDB>

L<Class::DBI>

=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-thesimpsonsquotes at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB

lib/ACME/QuoteDB/LoadDB.pm  view on Meta::CPAN


L<ACME::QuoteDB>


=head1 AUTHOR

David Wright, C<< <david_v_wright at yahoo.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-acme-quotedb-loaddb at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-QuoteDB::LoadDB>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.


=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ACME::QuoteDB::LoadDB

t/data/python_quotes.txt  view on Meta::CPAN

$       15.01  Alien Abduction Insurance
$   62,541.72  Python Web Site Maintenance
$      554.65  Great Comfort Cream
-------------
$1,096,191.97  Total Expenses
$      (21.76) Total Profit (Loss)
    Notes:
    (1) Many of you many not be aware of the fabulously successful 'Guido for
President' Campaign. While Guido has no interest in being the president, the
PSA thought it would be a cool way to collect money. The centerpiece of the
campaign featured an attractive offer to spend the night in Guido's spare
bedroom in exchange for a $50,000.00 contribution. (Mark Lutz stayed TWICE!)
    (2) Since the proliferation of Monty Python related names (Python, Monty,
Grail, Eric-the-Half-a-Compiler, et al.) has increased over the past year, the
PSA felt it would be wise to licencing the Python name to forestall any
lawsuits. An added benefit is that John Cleese is teaching Guido how to walk
funny.
    (3) Pre-Release vacations are spent in the Catskills. Post-Release
vacations are spent in the Bahamas. Guido is currently working on a system
which will allow him to make more releases of Python; thus octupling the number
of vacations he takes in a year.

t/data/python_quotes.txt  view on Meta::CPAN

      -- Vladimir Marangozov and Tim Peters, 23 Jun 1998

Python - why settle for snake oil when you can have the *whole* snake?
      -- Mark Jackson, 26 Jun 1998

The problem I have with "SETL sets" in Python is the same I have with every
other language's "killer core" in Python: SETL is much more than just "a set
type", Eiffel is much more than just fancy pre- and post- conditions, Perl's
approach to regexps is much more than just its isolated regexp syntax, Scheme
is much more than just first-class functions & lexical closures, and so on.
Good languages aren't random collections of interchangeable features: they have
a philosophy and internal coherence that's never profitably confused with their
surface features.
      -- Tim Peters, 10 Jul 1998

    "Since I'm so close to the pickle module, I just look at the pickles
directly, as I'm pretty good at reading pickles."
    "As you all can imagine, this trick goes over really well at parties."
      -- Jim Fulton and Paul Everitt on the Bobo list, 17 Jul 1998

My theory is that the churning of old threads and reminiscences (Continuations,
Icon influences, old-T-shirts, the pre news-group mailing list archive,
whitespace, closures, .... ) has brought some old messages to the surface, via

t/data/python_quotes.txt  view on Meta::CPAN


> >( float ( / 1 3 ))
> 0.33333333333333331
 Now *that* one is impressive: it's the best possible 17-digit decimal
representation of the best possible 53-bit fp binary representation of 1/3, and
17 is the minimum number of decimal digits you need in general so that a 53-bit
binary fp value can be exactly reconstructed by a best-possible atof.
      -- Tim Peters, 2 Sep 1998

This is not a technical issue so much as a human issue; we are limited and so
is our time. (Is this a bug or a feature of time? Careful; trick question!)
      -- Fred Drake on the Documentation SIG, 9 Sep 1998

There are also some surprises [in the late Miocene Australia] some small
mammals totally unknown and not obviously related to any known marsupial
(appropriately awarded names such as _Thingodonta_ and _Weirdodonta_) and a
giant python immortalized as _Montypythonoides_.
      -- _The Book of Life_, found by Aaron Watters

    Can the denizens of this group enlighten me about what the advantages of
Python are, versus Perl ?

t/data/python_quotes.txt  view on Meta::CPAN


    "Heh -- all it really broke so far was my resistance to installing Tk. I
suppose wizardry is inevitable after one installs something, though <wink>."
    "Spoken like a truly obsessive-compulsive wizard! It-takes-one-to-know
-one..."
      -- Tim Peters and Guido van Rossum, 6 Jan 1999

Note, however, that architectural forms are completely declarative and can be
implemented in a highly optimized fashion. The sorts of extensions that
Microsoft has proposed for XSL (<xsl:eval>...</>) would completely destroy
those features. Architectural mapping would, in general, be as reliable and
high performance as ordinary software -- (not at all).
      -- Paul Prescod, 6 Jan 1999

Darned confusing, unless you have that magic ingredient *coffee*, of which I
can pay you Tuesday for a couple pounds of extra-special grind today.
      -- John Mitchell, 11 Jan 1999

That's so obvious that someone has already got a patent on it.
      -- Guido van Rossum, 12 Jan 1999

t/data/python_quotes.txt  view on Meta::CPAN

prove that it was possible without a major rewrite to the core. Neel
Krishnaswami commented to Christian, "This is very neat, and you are completely
deranged".
      -- From Linux Weekly News, 17 Jul 1999

... we need more people like him, who are willing to explore without being
driven to argue with people about it.
      -- William Tanksley on Chuck Moore, inventor of Forth, 2 Jul 1999

Sorry for the term, I picked it up from Jim Fulton back when it was an
about-to-be-added feature for Principia/Aqueduct. As with so many Fultonisms,
it's vivid and tends to stick in one's (non-pluggable) brain.
      -- Paul Everitt on the term "pluggable brains", 5 Jul 1999

I picture a lump of inanimate flesh (a result from a relational database query)
being infused with the spark of life (object behavior, aka class).
      -- Jim Fulton on the term "pluggable brains", 5 Jul 1999

This is good. It means that while Ionesco is dead, his spirit lives on.
      -- Gordon McMillan on how Windows attaches meaning to 3-character
         file extensions, 30 Jul 1999

t/data/python_quotes.txt  view on Meta::CPAN

      -- Greg Ewing, 31 Aug 2000

The modules people have built for Python are like the roads the Romans built
through Europe. On this solid ground, you can move fast as you work on aspects
of program design that aren't so analytical -- user interface, multi-threaded
event dispatching models, all kinds of things that can be done a lot of
different ways and are hard to get right the first time through.
      -- Donn Cave, 3 Sep 2000

Python 2.0 beta 1 is now available from BeOpen PythonLabs. There is a long list
of new features since Python 1.6, released earlier today. We don't plan on any
new releases in the next 24 hours.
      -- Jeremy Hylton, in the 2.0b1 announcement, 5 Sep 2000

Fortunately, you've left that madness behind, and entered the clean, happy, and
safe Python world of transvestite lumberjacks and singing Vikings.
      -- Quinn Dunkan, 17 Sep 2000

Regular expressions are among my most valued tools, along with goto, eval,
multiple inheritance, preemptive multithreading, floating point, run-time type
identification, a big knife, a bottle of bleach, and 120VAC electricity. All of

t/data/python_quotes.txt  view on Meta::CPAN


    The same way as you get the name of that cat you found on your porch: the
cat (object) itself cannot tell you its name, and it doesn't really care -- so
the only way to find out what it's called is to ask all your neighbours
(namespaces) if it's their cat (object)...
    ....and don't be surprised if you'll find that it's known by many names, or
no name at all!
      -- Fredrik Lundh, 3 Nov 2000, in answer to the question "How can I
         get the name of a variable from C++ when I have the PyObject*?"

These are mostly nice features, to be sure, but they're also just that:
features. C++ has features. Python doesn't have a stellar score on my
elegance-o-meter, but for me its major win is the lack of features, and lack of
ambiguities. It fits in my brain.
      -- Quinn Dunkan, 18 Nov 2000

When explaining programming I sometimes compare programmers to photographers:
amateur photographers talk about cameras and lenses and gadgets. They know how
to make their camera do almost anything, and they are keen to argue the merits
of their favorite tools. Professional photographers talk about contrast and
lighting and composition. The camera is almost irrelevant. Ansel Adams used
cameras that were less sophisticated than a supermarket disposable, back when
photography was slow and tedious (like batch-oriented programming). Because the

t/data/python_quotes.txt  view on Meta::CPAN


The Martellibot Mark 1 has a completely European flavour to it, and adds a
cosmopolitan touch of linguistics to its output, sprinkling foreign language
references in. It is similar to the timbot in its overall erudition, but can be
distinguished from it by its tendency to indulge in flamewars (which, I
believe, it does mostly to convince us it is human).
      -- Steve Holden, 13 Dec 2000

    In keeping with the religious nature of the battle-- and religion offers
precise terms for degrees of damnation! --I suggest:
    struggling -- a supported feature; the initial state of all features; may
transition to Anathematized
    anathematized -- this feature is now cursed, but is supported; may
transition to Condemned or Struggling; intimacy with Anathematized features is
perilous
    condemned -- a feature scheduled for crucifixion; may transition to
Crucified, Anathematized (this transition is called "a pardon"), or Struggling
(this transition is called "a miracle"); intimacy with Condemned features is
suicidal
    crucified -- a feature that is no longer supported; may transition to
Resurrected
    resurrected -- a once-Crucified feature that is again supported; may
transition to Condemned, Anathematized or Struggling; although since
Resurrection is a state of grace, there may be no point in human time at which
a feature is identifiably Resurrected (i.e., it may *appear*, to the
unenlightened, that a feature moved directly from Crucified to Anathematized or
Struggling or Condemned -- although saying so out loud is heresy).
      -- Tim Peters, 18 Dec 2000

my-python-code-runs-5x-faster-this-month-thanks-to-dumping-$2K- on-a-
new-machine-ly y'rs
      -- Tim Peters, 26 Dec 2000

Really, I should pronounce on that PEP (I don't like it very much but haven't
found the right argument to reject it :-) ) so this patch can either go in or
be rejected.

t/data/python_quotes.txt  view on Meta::CPAN

      -- 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

You didn't say what you want to accomplish. If the idea of "provably correct"
programs appeals to you, Eiffel will give you more help than any other
practical language I know of. But since your post didn't lay out your
assumptions, your goals, or how you view language characteristics as fitting in
with either, you're not a *natural* candidate for embracing Design by Contract
<0.6 wink>.
      -- Tim Peters, 3 Jun 2001

t/data/python_quotes.txt  view on Meta::CPAN

before I really really *really* need to understand it fully.
      -- David Ascher, 19 Jul 2001

Moore's law is slowly making type declarations irrelevant...
      -- Paul Prescod, 29 Jul 2001

The mark of a mature programmer is willingness to throw out code you spent time
on when you realize it's pointless.
      -- Bram Cohen, 20 Sep 2001

Generators and iterators are among the most loving features ever introduced.
They will give and give, without ever asking anything from you save the
privilege of gracing your code, waiting with eager anticipation for you to
resume them at your pleasure, or even to discard them if you tire of their
charms. In fact, they're almost pathologically yielding.
      -- Tim Peters, 18 Oct 2001

IMO a bunch of the frustration I sometimes feel with Python comes from its
originally being intended as a "glue" language. It's too good for that, and
finds itself used as a work horse or even a race horse. Neither type of horse
belongs in the glue factory ;-).

t/data/www.amk.ca/quotations/python-quotes/page-2.html  view on Meta::CPAN

$   62,541.72  Python Web Site Maintenance
$      554.65  Great Comfort Cream
-------------
$1,096,191.97  Total Expenses
$      (21.76) Total Profit (Loss)
Notes:
(1) Many of you many not be aware of the
fabulously successful 'Guido for President' Campaign. While Guido
has no interest in being the president, the PSA thought it would be
a cool way to collect money. The centerpiece of the campaign
featured an attractive offer to spend the night in Guido's spare
bedroom in exchange for a $50,000.00 contribution. (Mark Lutz
stayed TWICE!)
(2) Since the proliferation of Monty Python
related names (Python, Monty, Grail, Eric-the-Half-a-Compiler, et
al.) has increased over the past year, the PSA felt it would be
wise to licencing the Python name to forestall any lawsuits. An
added benefit is that John Cleese is teaching Guido how to walk
funny.
(3) Pre-Release vacations are spent in the
Catskills. Post-Release vacations are spent in the Bahamas. Guido

t/data/www.amk.ca/quotations/python-quotes/page-3.html  view on Meta::CPAN

<p class='quotation' id='q78'>Python - why settle for snake oil
when you can have the <em>whole</em> snake?</p>
<p class='source'>Mark Jackson, 26 Jun 1998</p>
<p class='quotation' id='q79'>The problem I have with "SETL sets"
in Python is the same I have with every other language's "killer
core" in Python: SETL is much more than just "a set type", Eiffel
is much more than just fancy pre- and post- conditions, Perl's
approach to regexps is much more than just its isolated regexp
syntax, Scheme is much more than just first-class functions &amp;
lexical closures, and so on. Good languages aren't random
collections of interchangeable features: they have a philosophy and
internal coherence that's never profitably confused with their
surface features.</p>
<p class='source'>Tim Peters, 10 Jul 1998</p>
<p class='quotation' id='q80'>"Since I'm so close to the pickle
module, I just look at the pickles directly, as I'm pretty good at
reading pickles."
"As you all can imagine, this trick goes over
really well at parties."</p>
<p class='source'>Jim Fulton and Paul Everitt on the Bobo list, 17
Jul 1998</p>
<p class='quotation' id='q81'>My theory is that the churning of old
threads and reminiscences (Continuations, Icon influences,

t/data/www.amk.ca/quotations/python-quotes/page-3.html  view on Meta::CPAN

&gt; &gt;( float ( / 1 3 ))
&gt; 0.33333333333333331
Now <em>that</em> one is impressive: it's the best possible
17-digit decimal representation of the best possible 53-bit fp
binary representation of 1/3, and 17 is the minimum number of
decimal digits you need in general so that a 53-bit binary fp value
can be exactly reconstructed by a best-possible atof.
<p class='source'>Tim Peters, 2 Sep 1998</p>
<p class='quotation' id='q91'>This is not a technical issue so much
as a human issue; we are limited and so is our time. (Is this a bug
or a feature of time? Careful; trick question!)</p>
<p class='source'>Fred Drake on the Documentation SIG, 9 Sep
1998</p>
<p class='quotation' id='q92'>There are also some surprises [in the
late Miocene Australia] some small mammals totally unknown and not
obviously related to any known marsupial (appropriately awarded
names such as <i>Thingodonta</i> and <i>Weirdodonta</i>) and a
giant python immortalized as <i>Montypythonoides</i>.</p>
<p class='source'><cite>The Book of Life</cite>, found by Aaron
Watters</p>
<p class='quotation' id='q93'>Can the denizens of this group



( run in 0.320 second using v1.01-cache-2.11-cpan-a5abf4f5562 )