Hi, I'm seeing the following behavior of capitalization of method names for Class::DBI (comments in the code, code not runnable, would need db):
package Foo use base 'Class::DBI'; # declare columns to be capital letters to # coincide with database column names. Foo->columns(All=>qw/ID STATUS/); # In the place where Foo is used my $foo = Foo->retrieve(100); # getters $foo->STATUS(); # ok $foo->get('STATUS'); # ok $foo->Status(); # ok $foo->get('Status'); # ok # setters $foo->STATUS(3); # ok $foo->Status(3); # not ok: can't locate object method Status $foo->set('STATUS',3); # ok $foo->set('Status',3); # ok # elements in @columns are all lower cased my @columns = $foo->columns;
Basically there seems to be some inconsistency as to the cases of method names, and columns are lower cased internally. Any comments as to the reason?

In reply to lower case column names for Class::DBI by johnnywang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.