[SearchBuilder-devel] [RFC] Jifty-DBI API changes

Ruslan Zakirov ruslan.zakirov at gmail.com
Sat Sep 17 00:17:11 EDT 2005


Hello.
1) _init methods in Collection and Record classes:
* Collection.pm
sub _init {
    my $self = shift;
    my %args = (
        handle => undef,
        @_
    );
    $self->_handle( $args{'handle'} );
...
* Record.pm
sub _init {
    my $self   = shift;
    my $handle = shift;
    $self->_handle($handle);
...
I hope you see the difference

2) I don't understand why _handle is a private method. yes, in most
cases I don't want to override this, but I do want get handle use it
and don't be afraid that I'm doing something wrong.

3) Named arguments vs arrays. Named arguments have much benefits over
arrays, but sometimes you need array or in many cases only one
argument for example $record->set_mycolumn('foo') or
$r->handle($jdbi_handle). Framework should be strict on the subject
and it must be documented in one place. all methods should be splitted
into virtual groups by which style of argument handling they use.

... to be continued



-- 
Best regards, Ruslan.


More information about the SearchBuilder-devel mailing list