[Dbix-class] Class methods on result source classes

John Napiorkowski jjn1056 at yahoo.com
Wed Sep 12 16:23:24 GMT 2007


--- Oleg Pronin <syber.rus at gmail.com> wrote:

> Fixes the bug (with hanging Class::C3::XS in some
> cases).
> 

Don't mean to hijack the thread, but is there a list
someplace of all the problems with this (besides the
one mentioned)?  Personally I've moved to using the
newer 'load_namespaces' method so that I can more
clearly separate methods against the class versus the
result, but I've seen a lot of code floating around
that is using this.  I know we've marked it
experimental forever, but if making it 'keepable'
isn't too hard I have a few spare hours.  Seems like
the thread originator does as well :)

--john

> 
> --- DBIx-old/Class/ResultSetManager.pm  Fri Jun  1
> 07:27:35 2007
> +++ DBIx/Class/ResultSetManager.pm      Fri Sep  7
> 09:46:07 2007
> @@ -3,6 +3,7 @@
>  use warnings;
>  use base 'DBIx::Class';
>  use Class::Inspector;
> +use Sub::Name 'subname';
> 
>  =head1 NAME
> 
> @@ -90,7 +91,7 @@
>          if ($attrs->[0] eq 'ResultSet') {
>              no strict 'refs';
>              my $resultset_class =
> $self->_setup_resultset_class;
> -            *{"$resultset_class\::$meth"} =
> $self->can($meth);
> +            *{"$resultset_class\::$meth"} = subname
> "$resultset_class\::$meth" => $self->can($meth);
>              delete ${"${self}::"}{$meth};
>          }
>      }
> 
> ...by vladimir timofeev
> 
> 
> 
> 2007/9/3, Matt S Trout <dbix-class at trout.me.uk>:
> >
> > On Mon, Sep 03, 2007 at 08:13:49AM -0700, Evaldas
> Imbrasas wrote:
> > > If you all you need is to be able to write class
> methods for your
> > > model classes, you can use
> DBIx::Class::ResultSetManager:
> > >
> >
>
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/ResultSetManager.pm
> >
> > Nobody's stepped up to fix the outstanding bugs
> with it (notably
> > subclassing
> > not working right) so I expect to deprecate this
> for 09 and remove it for
> > 1.0
> > unless somebody makes the effort.
> >
> > --
> >      Matt S Trout       Need help with your
> Catalyst or DBIx::Class
> > project?
> >   Technical Director    Want a managed development
> or deployment platform?
> > Shadowcat Systems Ltd.  Contact mst (at)
> shadowcatsystems.co.uk for a
> > quote
> > http://chainsawblues.vox.com/
> > http://www.shadowcat.co.uk/
> >
> > _______________________________________________
> > List:
>
http://lists.rawmode.org/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.rawmode.org
> >
> > _______________________________________________
> List:
>
http://lists.rawmode.org/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.rawmode.org



       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469



More information about the DBIx-Class mailing list