DBIx::Class::Stash - stash for DBIC
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' });
stash method for DBIC.
data stash.
No bugs have been reported.
Atsushi Kobayashi <atsushi __at__ mobilefactory.jp>
<atsushi __at__ mobilefactory.jp>
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.
To install DBIx::Class::Stash, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::Stash
CPAN shell
perl -MCPAN -e shell install DBIx::Class::Stash
For more information on module installation, please visit the detailed CPAN module installation guide.