[Dbix-class] What namespace is best for a ResultSet Class with
Custom methods
Gurunandan Bhat
gbhat at pobox.com
Tue Nov 2 14:20:37 GMT 2010
Something very simple - I want to save a search that is frequently used as a
method that I can call on the resultset
$schema->resultset('A')->popular_search($arg1)
Thanks
On Tue, Nov 2, 2010 at 3:28 PM, Eden Cardim <edencardim at gmail.com> wrote:
> >>>>> "Gurunandan" =3D=3D Gurunandan Bhat <gbhat at pobox.com> writes:
>
> Gurunandan> I am new to DBIx::Class require help understanding a few
> Gurunandan> basic issues. I have defined an App::Schema::Result::A
> Gurunandan> class where the corresponding table, primary keys and
> Gurunandan> columns are described in the usual way. I want to add
> Gurunandan> custom methods to the class as a whole so I defined a
> Gurunandan> ResultSet class: App::Schema::ResultSet::A so that both
> Gurunandan> ResultSet/A and Result/A are under the Schema
> Gurunandan> folder. However I recently came across this Tutorial
> Gurunandan> that advises:
>
> This will not make the method be available in both classes, and the
> requirement of a custom method being magically available in both classes
> makes no sense without more detail. Can you explain what you're trying
> to achieve here?
>
> --
> 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 platfor=
m?
> http://blog.edencardim.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@lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20101102/370=
6e1a3/attachment.htm
More information about the DBIx-Class
mailing list