/[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 1015 by dpavlin, Sun Jan 25 15:20:40 2009 UTC revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 2  package Frey::DBIC::Browser; Line 2  package Frey::DBIC::Browser;
2  use Moose;  use Moose;
3    
4  extends 'Frey';  extends 'Frey';
5  with 'Frey::Web';  with 'Frey::Web', 'Frey::Config';
 with 'Frey::Config';  
 #with 'Frey::Storage';  
6    
7  has dbic_class => (  has dbic_class => (
8          is => 'rw',          is => 'rw',
9          isa => 'Str',          isa => 'Str',
10          requried => 1,          required => 1,
11          default => 'Reblog',          default => 'Reblog::Schema',
12  );  );
13    
14  has dsn => (  has dsn => (
# Line 20  has dsn => ( Line 18  has dsn => (
18          default => 'DBI:mysql:database=reblog;host=127.0.0.1;port=13306',          default => 'DBI:mysql:database=reblog;host=127.0.0.1;port=13306',
19  );  );
20    
21  has table => (  has result_set => (
22          is => 'rw',          is => 'rw',
23          isa => 'Str',          isa => 'Str',
24          required => 1,          required => 1,
# Line 63  sub as_sponge { Line 61  sub as_sponge {
61          $attrs->{ $_ } = $self->$_ foreach ( grep { $self->$_ } ( qw/page order_by/ ) );          $attrs->{ $_ } = $self->$_ foreach ( grep { $self->$_ } ( qw/page order_by/ ) );
62          warn "# attrs ", $self->dump( $attrs );          warn "# attrs ", $self->dump( $attrs );
63    
64            my $rs = $schema->resultset( $self->result_set )
65          my $rs = $schema->resultset( $self->table )                  ->published
66          #       ->search( undef, $attrs )                  ->search( undef, $attrs )
67                    ;
68    =for published
69                  ->search({                  ->search({
70                          'userdata.label' => 'published',                          'userdata.label' => 'published',
71                          'userdata.value_numeric' => 1,                          'userdata.value_numeric' => 1,
72                  }, {                  }, {
73                          join => [ 'userdata' ],                          join => [ 'userdata' ],
74                          %$attrs                          %$attrs,
75                  })                  })
76                  ;                  ;
77    =cut
78    
79          my @rows;          my @rows;
80          my @name;          my @name;
# Line 105  sub as_sponge { Line 106  sub as_sponge {
106          }          }
107  }  }
108    
109    =head1 SEE ALSO
110    
111    DBIx::Master Class
112    
113    L<http://www.shadowcat.co.uk/catalyst/-talks/yapc-na-2008/dbix-masterclass.xul> presentation
114    
115    L<http://www.shadowcat.co.uk/archive/conference-video/yapc-eu-2008/dbic-masterclass/> video
116    
117    =cut
118    
119    __PACKAGE__->meta->make_immutable;
120    no Moose;
121    
122  1;  1;

Legend:
Removed from v.1015  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26