Fayland 林 > DBIx-Class-ResultSet-Void-0.06 > DBIx::Class::ResultSet::Void

Download:
DBIx-Class-ResultSet-Void-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

NAME ^

DBIx::Class::ResultSet::Void - improve DBIx::Class::ResultSet with void context

VERSION ^

version 0.06

SYNOPSIS ^

    my $rs = $schema->resultset('CD');
    $rs->find_or_create( {
        artist => 'Massive Attack',
        title  => 'Mezzanine',
    } );

As ResultSet subclass in Schema.pm:

    __PACKAGE__->load_namespaces(
        default_resultset_class => '+DBIx::Class::ResultSet::Void'
    );

Or in Schema/CD.pm

    __PACKAGE__->resultset_class('DBIx::Class::ResultSet::Void');

Or in ResultSet/CD.pm

    use base 'DBIx::Class::ResultSet::Void';

DESCRIPTION ^

The API is the same as DBIx::Class::ResultSet.

use exists instead of find unless defined wantarray.

(Thank ribasushi to tell me count is bad)

METHODS

AUTHOR ^

  Fayland Lam <fayland@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2009 by Fayland Lam.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.

syntax highlighting: