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.
  • The "order_date" would be handled by expecting parameters named "order_day", "order_month" and "order_year". How this is done internally is an example in the Class::CGI docs.

    Danger Will Robinson!

    I did that too. It hurt.

    It was after the second rewrite that I finally ended up with that namespacing and dot-seperators thing.

    So...

    order_date => 'Class::CGI::DateTime', ... should not break out of "order_date".

    Rather, what works really well is that it expects order_date.day, order_date.month, order_date.year fie
    • order_date => 'Class::CGI::DateTime' should not break out of “order_date”.

      Did you actually look at Class::CGI? It has no conventions whatsoever regarding parameter naming. You can do your beloved dot-based namespaces just as well as someone else can choose not to. Given order_date, it is entirely up to Class::CGI::DateTime to decide whether it wants to consume qw( order_year order_month order_day ) or qw( order_date.year order_date.month order_date.day ).

      • You sound bitter.

        Certainly it is up to order_date what it wants to consume.

        Just as it's up to Class::CGI whether it wants to use Class::DBI as well, or up to Class::CGI::DateTime if it wants to spread it's code around into Class::CGI::TextBox and Class::CGI::DropBox.

        Except that although you can do this, you shouldn't.

        If you have n Class::CGI objects on a page, how do you share out the names? It naturally becomes a namespace, just as Perl uses namespace. That it is a dot is a matter of personal preference, i