Daizu
view release on metacpan or search on metacpan
lib/Daizu/File.pm view on Meta::CPAN
the
This is where article loader plugins set with the L<Daizu> method
L<add_article_loader()|Daizu/$cms-E<gt>add_article_loader($mime_type, $path, $object, $method)>
are invoked.
Doesn't return anything.
=cut
sub update_loaded_article_in_db
{
my ($self) = @_;
return unless $self->{article};
return transactionally($self->{db}, \&_update_loaded_article_in_db_txn,
$self);
}
sub _update_loaded_article_in_db_txn
{
my ($self) = @_;
lib/Daizu/File.pm view on Meta::CPAN
These two values can be used to determine whether redirect maps need to
be regenerated by the caller.
The work is done in a transaction, so that if it fails there will be
no changes to the database.
TODO - update docs about return value
=cut
sub update_urls_in_db
{
my ($self, $dup_urls) = @_;
return transactionally($self->{db}, \&_update_urls_in_db_txn, $self,
$dup_urls);
}
sub _update_urls_in_db_txn
{
my ($self, $dup_urls) = @_;
my $db = $self->{db};
lib/Daizu/Publish.pm view on Meta::CPAN
return $path;
}
=item update_live_sites($cms, $start_rev)
TODO
=cut
sub update_live_sites
{
my ($cms, $start_rev) = @_;
return transactionally($cms->{db}, \&_update_live_sites_txn,
$cms, $start_rev);
}
sub _update_live_sites_txn
{
my ($cms, $start_rev) = @_;
my $end_rev = $cms->live_wc->current_revision;
lib/Daizu/Util.pm view on Meta::CPAN
URLs which occur during the update, when one file adds a new URL which is
already active for another file, but will be inactive by the end of the
transaction.
All of this is done in a single database transaction.
TODO - update docs about new return value
=cut
sub update_all_file_urls
{
my ($cms, $wc_id) = @_;
my $db = $cms->{db};
return transactionally($db, sub {
my $sth = $db->prepare(q{
select id
from wc_file
where wc_id = ?
});
lib/Daizu/Wc.pm view on Meta::CPAN
=item $wc->update($revnum)
Update a database working copy to revision C<$revnum>. This is done in a
transaction, which will be rolled back if anything goes wrong, leaving the
WC in its original state. C<$revnum> can be C<undef> to update to the most
recent revision available.
=cut
sub update
{
my ($self, $revnum) = @_;
return transactionally($self->{cms}{db}, \&_update_txn, $self, $revnum);
}
sub _update_txn
{
my ($self, $revnum) = @_;
my $cms = $self->{cms};
my $db = $cms->{db};
( run in 0.261 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )