Peter Speltz wrote:
I'm starting a list of Incompatibilities and fixes for Maypole with
Class:;DBI  3.XXX.

This is A Good Idea. It does point out a Slight Problem. The incompatible interface change you describe below occurred on "minor sub-version release" 3.0.7. This means that Maypole needs to specify not just a minimum version for CDBI, but also a maximum version, I think.

It probably won't be too much of a problem for existing CDBI users, but I'll bet it will lead to WTF cries from people who newly install Maypole and all its dependencies.

"minor sub-version release" 3.0.9, one week later, made another interface change from create() to insert(). Fortunately in this case at least the old method call still works.

Better yet "Functionality which was introduced during a minor sub-version release may disappear without warning in a later minor sub-version release".

It seems to me that all the minor versions ought to be labelled as development releases on CPAN, but they're not.

We obviously need a policy for Maypole! It seems clear that:

 -1- We need to state the exact version of CDBI that Maypole expects.
 -2- We need to record the exact minor sub-version release for all
     patches;
 -3- As Tony says, we "should ... have good tests in place".

It's clearly impractical to keep up with minor sub-version releases, so the question will be whether it's practical to keep up with major sub-versions. Does anybody know how frequent they are likely to be?

Cheers, Dave

PS The example in CDBI's POD of how to use accessor_name_for is a fascinating illustration of how wizard-level Perl features can be made to confuse poor users.

1)  In the template name  macros:
        IN the display_line macro :

      accessor_name is deprecated. Use "accessor_name_for" . Also you
now have to pass a column obj as the arg to it. If you have Related
accessors (for has_many or might_have cols ) or just another method ,
you have to take that into account. Here is a patch for the two cases
in the IF ELSEIF sequence that makes up that macro:

....
# url check
# string check
ELSIF ( col_obj = item.find_column(col) ) ;
# A real column check handling customized accessor names
            accessor = item.accessor_name_for(col_obj);
            maybe_link_view(item.$accessor);
ELSE;
# Everything else not colums like accessors to related objects
#  or some other method that returns data you want in a cell in the
# listing table. Try it it is fun*. ;)
            maybe_link_view(item.$col);
END;
....

* for this to be fun you need to make a table heading show up for the
non column method in your list_columns. Under standard maypole
templates you can do this by putting an entry in the "column_names"
list for this method.  Or you can edit the list template (Better idea
because then while you're there you can make the heading link created
for you method not break your app. See list table headings bug report.
)



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to