/[Frey]/trunk/lib/Frey/DBIC/Browser.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/DBIC/Browser.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1019 by dpavlin, Sun Jan 25 16:51:44 2009 UTC revision 1020 by dpavlin, Mon Jan 26 14:51:11 2009 UTC
# Line 10  has dbic_class => ( Line 10  has dbic_class => (
10          is => 'rw',          is => 'rw',
11          isa => 'Str',          isa => 'Str',
12          required => 1,          required => 1,
13          default => 'Reblog',          default => 'Reblog::Schema',
14  );  );
15    
16  has dsn => (  has dsn => (
# Line 20  has dsn => ( Line 20  has dsn => (
20          default => 'DBI:mysql:database=reblog;host=127.0.0.1;port=13306',          default => 'DBI:mysql:database=reblog;host=127.0.0.1;port=13306',
21  );  );
22    
23  has table => (  has result_set => (
24          is => 'rw',          is => 'rw',
25          isa => 'Str',          isa => 'Str',
26          required => 1,          required => 1,
# Line 63  sub as_sponge { Line 63  sub as_sponge {
63          $attrs->{ $_ } = $self->$_ foreach ( grep { $self->$_ } ( qw/page order_by/ ) );          $attrs->{ $_ } = $self->$_ foreach ( grep { $self->$_ } ( qw/page order_by/ ) );
64          warn "# attrs ", $self->dump( $attrs );          warn "# attrs ", $self->dump( $attrs );
65    
66            my $rs = $schema->resultset( $self->result_set )
67          my $rs = $schema->resultset( $self->table )                  ->published
68          #       ->search( undef, $attrs )                  ->search( undef, $attrs )
69                    ;
70    =for published
71                  ->search({                  ->search({
72                          'userdata.label' => 'published',                          'userdata.label' => 'published',
73                          'userdata.value_numeric' => 1,                          'userdata.value_numeric' => 1,
74                  }, {                  }, {
75                          join => [ 'userdata' ],                          join => [ 'userdata' ],
76                          %$attrs                          %$attrs,
77                  })                  })
78                  ;                  ;
79    =cut
80    
81          my @rows;          my @rows;
82          my @name;          my @name;
# Line 105  sub as_sponge { Line 108  sub as_sponge {
108          }          }
109  }  }
110    
111    =head1 SEE ALSO
112    
113    DBIx::Master Class
114    
115    L<http://www.shadowcat.co.uk/catalyst/-talks/yapc-na-2008/dbix-masterclass.xul> presentation
116    
117    L<http://www.shadowcat.co.uk/archive/conference-video/yapc-eu-2008/dbic-masterclass/> video
118    
119    =cut
120    
121  1;  1;

Legend:
Removed from v.1019  
changed lines
  Added in v.1020

  ViewVC Help
Powered by ViewVC 1.1.26