MCP-Wiki

 view release on metacpan or  search on metacpan

lib/MCP/Wiki/Document.pm  view on Meta::CPAN

    # Replace lines in the section (excluding the heading line itself)
    my @new_lines = @lines;
    splice @new_lines, $entry->line_start, $entry->line_end - $entry->line_start + 1,
        split /\n/, $new_content;

    Path::Tiny::path($self->file_path)->spew_utf8(join("\n", @new_lines));

    return 1;
}

sub update_content_hash {
    my ($self) = @_;
    return sha256_hex($self->content);
}

1;

__END__

=pod



( run in 0.353 second using v1.01-cache-2.11-cpan-bbe5e583499 )