Atsushi Kobayashi > DBIx-Class-Stash-0.07 > DBIx::Class::Stash

Download:
DBIx-Class-Stash-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.07   Source  

NAME ^

DBIx::Class::Stash - stash for DBIC

SYNOPSIS ^

    package Proj::Schema::User;
    __PACKAGE__->load_components(qw/Stash .../);
    
    sub insert {
        my $self = shift;
        my $user = $self->next::method(@_);
        $user->create_related('profile',{ zip1 => $self->stash->{zip1} });
        return $user;
    }

    in your script:
    my $user_rs = $self->model('User')
    $user_rs->stash->{zip1} = $zip1;
    $user_rs->create({ name => 'nekokak' });
    
    or 
    
    $self->model->stash->{zip1} = $zip1;
    my $user = $self->model('User')->create({ name => 'nekokak' });

DESCRIPTION ^

stash method for DBIC.

METHOD ^

stash

data stash.

BUGS AND LIMITATIONS ^

No bugs have been reported.

AUTHOR ^

Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>

LICENCE AND COPYRIGHT ^

Copyright (c) 2007, Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>. All rights reserved.

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

syntax highlighting: