Changeset 1589

Show
Ignore:
Timestamp:
05/30/05 15:20:09
Author:
miyagawa
Message:

misc upgrades to CPAN modules

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Class-DBI-AbstractSearch/trunk/lib/Class/DBI/AbstractSearch.pm

    r1421 r1589  
    99@EXPORT = qw(search_where); 
    1010 
    11 use SQL::Abstract
     11use SQL::Abstract::Limit
    1212 
    1313sub search_where { 
     
    1616    my $attr  = (ref $_[0]) ? $_[1]          : undef; 
    1717    my $order = ($attr)     ? delete($attr->{order_by}) : undef; 
     18    my $limit  = ($attr)    ? delete($attr->{limit})    : undef; 
     19    my $offset = ($attr)    ? delete($attr->{offset})   : undef; 
    1820 
    1921    # order is deprecated, but still backward compatible 
     
    2628        Carp::croak("$class should inherit from Class::DBI >= 0.90"); 
    2729    }; 
    28     my $sql = SQL::Abstract->new(%$attr); 
    29     my($phrase, @bind) = $sql->where($where, $order); 
     30    my $sql = SQL::Abstract::Limit->new(%$attr); 
     31    my($phrase, @bind) = $sql->where($where, $order, $limit, $offset); 
    3032    $phrase =~ s/^\s*WHERE\s*//i; 
    3133    return $class->retrieve_from_sql($phrase, @bind); 
     
    3739=head1 NAME 
    3840 
    39 Class::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract 
     41Class::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract::Limit 
    4042 
    4143=head1 SYNOPSIS 
     
    5355      { artist => [ 'Ozzy', 'Kelly' ], 
    5456        status => { '!=', 'outdated' } }, 
    55       { order_by  => "reldate DESC" }); 
     57      { order_by      => "reldate DESC", 
     58        limit_dialect => 'LimitOffset', 
     59        limit         => 1 
     60        offset        => 2 }); 
    5661 
    5762=head1 DESCRIPTION 
    5863 
    5964Class::DBI::AbstractSearch is a Class::DBI plugin to glue 
    60 SQL::Abstract into Class::DBI. 
     65SQL::Abstract::Limit into Class::DBI. 
    6166 
    6267=head1 METHODS 
     
    8893your query. 
    8994 
     95=item * 
     96 
     97B<limit_dialect> 
     98 
     99Scalar, DBI handle, object class, etc. that describes the syntax model 
     100for a LIMIT/OFFSET SQL clause.  Please see SQL::Abstract::Limit 
     101for more information. 
     102 
     103=item * 
     104 
     105B<limit> 
     106 
     107Scalar value that will be used for LIMIT argument in a query. 
     108 
     109=item * 
     110 
     111B<offset> 
     112 
     113Scalar value that will be used for OFFSET argument in a query. 
     114 
    90115=back 
    91116 
    92 Any other attributes are passed to the SQL::Abstract constructor, 
     117Any other attributes are passed to the SQL::Abstract::Limit constructor, 
    93118and can be used to control how queries are created.  For example, 
    94119to use 'AND' instead of 'OR' by default, use: 
     
    110135=head1 SEE ALSO 
    111136 
    112 L<Class::DBI>, L<SQL::Abstract> 
     137L<Class::DBI>, L<SQL::Abstract>, L<SQL::Abstract::Limit> 
    113138 
    114139=cut 
  • Class-DBI-AbstractSearch/trunk/t/01_abstract.t

    r833 r1589  
    55    eval "use DBD::SQLite"; 
    66    plan $@ ? (skip_all => 'needs DND::SQLite for testing') 
    7         : (tests => 1); 
     7        : (tests => 2); 
    88} 
    99 
     
    3737    my @films = Film->search_where(title => [ "title 10", "title 20" ]); 
    3838    is @films, 2, "films return 2"; 
     39 
     40    @films = Film->search_where( 
     41      { title => { 'like' => 'title%' } }, 
     42      { limit_dialect => 'LimitOffset', 
     43        limit         => 5, 
     44        offset        => 10 } 
     45    ); 
     46    is @films, 5, "films return 5"; 
    3947} 
    4048 
  • Kwiki-TypeKey/trunk/lib/Kwiki/TypeKey.pm

    r1539 r1589  
    7979Integration with C<edit_by> link: (e.g. Kwiki::RecentChanges) 
    8080 
    81 =item * 
    82  
    83 Logout feature. 
    84  
    8581=back 
    8682 
  • PHP-Session/trunk/Changes

    r936 r1589  
    11Revision history for Perl extension PHP::Session 
     2 
     30.23  Thu Apr 14 10:28:06 JST 2005 
     4        - Added binmode $handle for Win32 platform 
     5          (Thanks to Carl Stehle) 
    26 
    370.22  Sun Oct  5 05:33:32 JST 2003 
  • PHP-Session/trunk/META.yml

    r936 r1589  
    22#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX# 
    33name:         PHP-Session 
    4 version:      0.21 
     4version:      0.23 
    55version_from: lib/PHP/Session.pm 
    66installdirs:  site 
  • PHP-Session/trunk/lib/PHP/Session.pm

    r936 r1589  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.22
     5$VERSION = 0.23
    66 
    77use vars qw(%SerialImpl); 
     
    138138    my $self = shift; 
    139139    my $handle = FileHandle->new($self->_file_path) or return; 
     140    binmode $handle; 
    140141    local $/ = undef; 
    141142    return scalar <$handle>; 
  • XML-Atom-Lifeblog/trunk/Changes

    r1535 r1589  
    44        * Added non-image files like video/3gpp post 
    55        (Thanks to Ben Trott) 
    6         - Depreciated scalarref post: No way to figure out magic of 3gpp 
    7  
     6        - Deprecated scalarref post: No way to figure out magic of 3gpp 
    87 
    980.01  Tue Mar 29 14:35:16 2005 
  • XML-Atom-Lifeblog/trunk/lib/XML/Atom/Lifeblog.pm

    r1535 r1589  
    126126 
    127127Creates a new Lifeblog entry and post it to a Lifeblog aware server 
    128 using C<< <standalone> >> element. C<$image> is a filepath of image or video files to be posted. 
     128using C<< <standalone> >> element. C<$media> is a filepath of image or video files to be posted. 
    129129 
    130130Returns XML::Atom::Entry object for the posted entry.