If you are following along in Ubuntu 8.10, you will need to
upgrade your version of
L<Catalyst::Model::DBIC::Schema|Catalyst::Model::DBIC::Schema>
-to 0.22 or higher. To do this, we can install directly from CPAN:
+to 0.23 or higher. To do this, we can install directly from CPAN:
$ cpan Catalyst::Model::DBIC::Schema
$ perl -MCatalyst::Model::DBIC::Schema -e \
'print "$Catalyst::Model::DBIC::Schema::VERSION\n"'
- 0.22
+ 0.23
Make sure you get version 0.22 or higher.
-B<Note:> Utuntu will automatically "do the right thing" and use the
+B<Note:> Ubuntu will automatically "do the right thing" and use the
module we installed from CPAN and ignore the older version we picked
up via the C<apt-get> command. If you are using a different
environment, you will need to make sure you are using v0.22 or higher
=cut
sub created_after {
- my ($self, $datetime) = @_;
-
- my $date_str = $self->_source_handle->schema->storage
- ->datetime_parser->format_datetime($datetime);
-
- return $self->search({
- created => { '>' => $date_str }
- });
+ my ($self, $datetime) = @_;
+
+ my $date_str = $self->_source_handle->schema->storage
+ ->datetime_parser->format_datetime($datetime);
+
+ return $self->search({
+ created => { '>' => $date_str }
+ });
}
1;
=cut
sub title_like {
- my ($self, $title_str) = @_;
+ my ($self, $title_str) = @_;
- return $self->search({
- title => { 'like' => "%$title_str%" }
- });
+ return $self->search({
+ title => { 'like' => "%$title_str%" }
+ });
}
We defined the search string as C<$title_str> to make the method more