Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • * why no default css file included to go with the templates in the custom directory?

    the beerdb.css is included in the latest CVS. there are some pointers on the wiki where to get a copy (or from the web cvs interface) or

    $ wget http://dsl81-hayter.usc.edu/maypole.css

    * why no frontpage template in the factory directory - something like the apache default start page would be cool.

    also fixed in CVS. i think he made some tweaks while writing all of the articles and is moving them back into the base module all proper like.

    * how do I change the order fields appear on the form?

    override App::Table::display_columns somewhere..

    sub Sharpe::Site::display_columns {
            ( qw| name comments version urn url | )
    }
                                                                                                                               

    * How do I change dropdowns to use a field other than name or id?

    this is a function of Class::DBI proper. DBI::Loader makes some guesses (like 'name' is used for stringification if it's there). The pulldown automagic is from the Relations that have been created.

    App->config->{loader}->relationship(
      'beer has breweries'
    );

    create table beer (
    id integer ...,
    name varchar ...,
    brewery integer ...,
    ...
    )

    create table brewery (
    id integer ...,
    name varchar ...,
    ...
    )
                                                                                                                               

    the has_a/has_many relationships that Class::DBI::Loader creates controll the pulldown creation.

    without Loader or manual has_a/has_many setup:
    # a brewery.id BeerDB::Beer->retrieve(1)->brewery == 1

    with Loader or manual has_a/has_many setup:
    BeerDB::Beer->retrieve(1)->brewery == (a Brewery object)

    if you don't follow simple-enough table schemas for the Loader to guess how it should setup the relations you can do them yourself and maypole will use them.

    .. cheers carl.

    --

    @JAPH = qw(Hacker Perl Another Just);
    print reverse @JAPH;