Re: RFC: DBIx::Counter - Manipulate named counters stored in a database

2005-04-17 Thread Rhesa Rozendaal
Smylers wrote: OK, I've had a look, it seems like good Perl code to me -- and as a bonus, from reading your code I learnt about the DBI prepare_cached method (so that's a wheel that I can stop re-inventing on an ad hoc basis in my own code). You mean stuff like $sth ||= $dbh-prepare... ? ;^) I was

Re: RFC: DBIx::Counter - Manipulate named counters stored in a database

2005-04-17 Thread A. Pagaltzis
* Smylers [EMAIL PROTECTED] [2005-04-16 14:40]: One nice way of dealing with this that I hadn't thought of till I recently spotted in Text::VimColor (though it's probably used in many places) is simply to bless the options hash, so you'd end up with something like: unshift @_, 'initial'

Re: RFC: DBIx::Counter - Manipulate named counters stored in a database

2005-04-17 Thread Smylers
Rhesa Rozendaal writes: Smylers wrote: my %opts = (countername = $countername, @_); [...] bless \%opts, $pkg; But supplying the default values for each individual option means this technique doesn't avoid having a line listing each option -- it just saves having to mention

Re: RFC: DBIx::Counter - Manipulate named counters stored in a database

2005-04-17 Thread A. Pagaltzis
* Smylers [EMAIL PROTECTED] [2005-04-17 19:20]: Question: Consider the point of view of the author of a module that subclasses your module; such a module could well add further named params for its additional functionality -- is it more useful for the constructor in the superclass to store

Re: RFC: Simple Tied Filehandle code

2005-04-17 Thread James E Keenan
James E Keenan wrote: I am requesting comments on namespace for the following package which I would like to upload to CPAN. package Yet::To::Be::Named; use strict; use Carp; sub TIEHANDLE { my $class = shift; my @lines = @_; bless [EMAIL PROTECTED],