]>
Dogcows Code - chaz/p5-File-KDBX/blob - lib/File/KDBX/Transaction.pm
1 package File
::KDBX
::Transaction
;
2 # ABSTRACT: Make multiple database edits atomically
7 use Devel
::GlobalDestruction
;
8 use File
::KDBX
::Util
qw(:class);
11 our $VERSION = '0.903'; # VERSION
17 $object->begin_work(@_);
18 return bless {object
=> $object}, $class;
21 sub DESTROY
{ !in_global_destruction
and $_[0]->rollback }
24 has 'object', is => 'ro';
29 return if $self->{done
};
31 my $obj = $self->object;
40 return if $self->{done
};
42 my $obj = $self->object;
58 File::KDBX::Transaction - Make multiple database edits atomically
68 Get the object being transacted on.
74 $txn = File::KDBX::Transaction->new($object);
76 Construct a new database transaction for editing an object atomically.
82 Commit the transaction, making updates to the L</object> permanent.
88 Roll back the transaction, throwing away any updates to the L</object> made since the transaction began. This
89 happens automatically when the transaction is released, unless it has already been committed.
93 Please report any bugs or feature requests on the bugtracker website
94 L<https://github.com/chazmcgarvey/File-KDBX/issues>
96 When submitting a bug or request, please include a test-file or a
97 patch to an existing test-file that illustrates the bug or desired
102 Charles McGarvey <ccm@cpan.org>
104 =head1 COPYRIGHT AND LICENSE
106 This software is copyright (c) 2022 by Charles McGarvey.
108 This is free software; you can redistribute it and/or modify it under
109 the same terms as the Perl 5 programming language system itself.
This page took 0.036781 seconds and 4 git commands to generate.