possibility of hashref argument to Relationship::Base::proxy

3 messages Options
Embed this post
Permalink
Matt Whipple

possibility of hashref argument to Relationship::Base::proxy

Reply Threaded More More options
Print post
Permalink
Is there anyhing to prohibit extending the proxy method in
Relationship::Base to accept a hashref which allows for the keys to
create the differently named local accessors to the value stored remote
fields?

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@...
Eden Cardim

Re: possibility of hashref argument to Relationship::Base::proxy

Reply Threaded More More options
Print post
Permalink
On Sat, Aug 29, 2009 at 2:15 PM, Matt Whipple<[hidden email]> wrote:
> Is there anyhing to prohibit extending the proxy method in
> Relationship::Base to accept a hashref which allows for the keys to create
> the differently named local accessors to the value stored remote fields?

Why not create a method with a different name in the target class,
then declare a proxy to that?

--
   Eden Cardim       Need help with your Catalyst or DBIx::Class project?
  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://edenc.vox.com/            http://www.shadowcat.co.uk/servers/

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@...
Matt Whipple

Re: possibility of hashref argument to Relationship::Base::proxy

Reply Threaded More More options
Print post
Permalink
Eden Cardim wrote:

> On Sat, Aug 29, 2009 at 2:15 PM, Matt Whipple<[hidden email]> wrote:
>  
>> Is there anyhing to prohibit extending the proxy method in
>> Relationship::Base to accept a hashref which allows for the keys to create
>> the differently named local accessors to the value stored remote fields?
>>    
>
> Why not create a method with a different name in the target class,
> then declare a proxy to that?
>
>  
That's what I'm doing presently, but was thinking that replacing it with
the mapping within the proxy call would be more  concise and often more
relevant.  I'd think the ease of the workaround would knock the priority
of this change down a few pegs, but was thinking of working on it myself
unless there are inherent reasons to avoid it.

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@...