Teng::Plugin::RowObjectCreationSwitcher - Teng plugin which enables/disables suppress_row_objects with guard object
use MyProj::DB; use parent qw(Teng); __PACKAGE__->load_plugin('RowObjectCreationSwitcher'); package main; my $db = MyProj::DB->new(dbh => $dbh); { my $guard = $db->temporary_suppress_row_objects_guard(1); # row object creation is suppressed { my $guard2 = $db->temporary_suppress_row_objects_guard(1); # row object is created. (isn't suppressed) ... # do something } # dismiss $guard2 (row object creation is suppressed) ... # do something } # dismiss $guard (row object creation is unsuppressed)
Teng::Plugin::RowObjectCreationSwitcher is plugin for Teng which provides switcher to enable/disable to generate row object. This switcher returns guard object and if guard is dismissed, status is back to previous.
set suppress_row_objects and return guard object. When guard is dismissed, status is back to previous.
Copyright (C) Takuya Tsuchida.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Takuya Tsuchida <tsucchi@cpan.org>
To install Teng::Plugin::RowObjectCreationSwitcher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Teng::Plugin::RowObjectCreationSwitcher
CPAN shell
perl -MCPAN -e shell install Teng::Plugin::RowObjectCreationSwitcher
For more information on module installation, please visit the detailed CPAN module installation guide.