On Thu, 19 Apr 2007 08:43:47 -0700, Michael wrote:

> The only glitch is that I have to define my 'Bill 2 Name' column accessor(?)
> before I can use it:

> $bill2name = "Bill 2 Name";

> print $clients->$bill2name

> ... and now I can get some work done. 

You don't have to give the accessor the same name as the column - you
can say something like:

 __PACKAGE__->add_columns('Bill 2 Name'=>{ accessor=>'bill2name' }, ...);

And then you'd just go:

 print $clients->bill2name;

without changing the database.

(See 
<http://search.cpan.org/~blblack/DBIx-Class-0.07006/lib/DBIx/Class/ResultSource.pm#add_columns>).


  Best regards,

     Adam

-- 
 "Vi är små citroner"                                         Adam Sjøgren
                                                         [EMAIL PROTECTED]

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to