App-DocKnot
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/DocKnot/Spin/Versions.pm view on Meta::CPAN
}
# Update the version and release date for a package. Add the change to Git if
# the .versions file is at the top of a Git repository.
#
# $package - Name of the package
# $version - New version
# $timestamp - New release date as seconds since epoch
#
# Throws: Text exception on failure
sub update_version {
my ($self, $package, $version, $timestamp) = @_;
my $date = strftime('%Y-%m-%d', localtime($timestamp));
my $time = strftime('%H:%M:%S', localtime($timestamp));
# Edits the line for the package to replace the version and release date.
my $edit = sub {
my ($product, $old_version, $old_date, $old_time) = split(q{ });
return if $product ne $package;
# We're going to replace the old version with the new one, but we need
lib/App/DocKnot/Update.pm view on Meta::CPAN
bless($self, $class);
return $self;
}
# Update an older version of DocKnot configuration. Currently, this only
# handles the old JSON format.
#
# Raises: autodie exception on failure to read metadata
# Text exception on inconsistencies in the package data
# Text exception if schema checking failed on the converted config
sub update {
my ($self) = @_;
# Ensure we were given a valid metadata argument.
if (!$self->{metadata}->is_dir()) {
my $metadata = $self->{metadata};
croak("metadata path $metadata does not exist or is not a directory");
}
# Tell YAML::XS that we'll be feeding it JSON::PP booleans.
local $YAML::XS::Boolean = 'JSON::PP';
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.556 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )