FAQ
Hello,
I'm trying to override get and set functions in all model classes in
my application. Unfortunetely creating get and set functions in each
class is the only way working for me right now. When I place them in
MyApp::M::CDBI, from which all model classes inherit, it doesn't
quite work -- my debug log shows that only accessors of
MyApp::M::CDBI itself is overriden, not of inhereted classes. I guess
it has something to do with the way Class::DBI::Loader creates them,
but don't understand yet how it works.
Can anybody give me a hint on how to get this working?

--
Patryk Dw?rznik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2361 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051111/6be36484/smime.bin

Search Discussions

  • Bill Moseley at Nov 11, 2005 at 2:45 pm

    On Fri, Nov 11, 2005 at 02:15:19PM +0100, Patryk Dw?rznik wrote:
    I'm trying to override get and set functions in all model classes in
    my application. Unfortunetely creating get and set functions in each
    class is the only way working for me right now. When I place them in
    MyApp::M::CDBI, from which all model classes inherit, it doesn't
    quite work -- my debug log shows that only accessors of
    MyApp::M::CDBI itself is overriden, not of inhereted classes. I guess
    it has something to do with the way Class::DBI::Loader creates them,
    but don't understand yet how it works.
    Can anybody give me a hint on how to get this working?
    How are you calling loader?


    --
    Bill Moseley
    moseley@hank.org
  • Patryk Dwórznik at Nov 12, 2005 at 9:01 pm

    On Nov 11, 2005, at 2:51 PM, Bill Moseley wrote:

    How are you calling loader?
    Actually I'm not. It's being called in Catalyst::Model::CDBI.
    I placed get/set functions in a class directly inheriting from
    C::M::CDBI. Then tried to use additional_base_classes in the config
    hash to force Class::DBI::Loader to use my class with set/get
    functions as a base. With no success whatsoever.

    --
    Patryk Dw?rznik
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: smime.p7s
    Type: application/pkcs7-signature
    Size: 2361 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051112/1c4f498c/smime.bin
  • Matt S Trout at Nov 12, 2005 at 9:14 pm

    On Sat, Nov 12, 2005 at 09:07:18PM +0100, Patryk Dw?rznik wrote:
    On Nov 11, 2005, at 2:51 PM, Bill Moseley wrote:


    How are you calling loader?
    Actually I'm not. It's being called in Catalyst::Model::CDBI.
    I placed get/set functions in a class directly inheriting from
    C::M::CDBI. Then tried to use additional_base_classes in the config
    hash to force Class::DBI::Loader to use my class with set/get
    functions as a base. With no success whatsoever.
    Yep, that ain't gonna work. You're looking for left_base_classes :)

    --
    Matt S Trout Specialists in Perl consulting, web development, and
    Technical Director UNIX/Linux systems architecture and automation. Mail
    Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information

    + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
  • Patryk Dwórznik at Nov 13, 2005 at 5:16 pm

    On Nov 12, 2005, at 9:28 PM, Matt S Trout wrote:
    Yep, that ain't gonna work. You're looking for left_base_classes :)
    I tried this one too, but unfortunetely I had some old version of
    CDBI::Loader that knew nothing about left_base_classes. Now it works
    perfectly. Thanks.

    --
    Patryk Dw?rznik


    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: smime.p7s
    Type: application/pkcs7-signature
    Size: 2361 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051113/912eccd5/smime.bin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedNov 11, '05 at 2:10p
activeNov 13, '05 at 5:16p
posts5
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase