App-sbozyp

 view release on metacpan or  search on metacpan

bin/sbozyp  view on Meta::CPAN

    return 0 == $> ? 1 : 0;
}

sub i_am_root_or_die {
    my ($msg) = @_;
    sbozyp_die($msg // 'must be root') unless i_am_root();
}

sub decode_url { # https://stackoverflow.com/a/4510561/13603478
    my ($url) = @_;
    my $decoded = $url =~ s/%([A-Fa-f\d]{2})/chr hex $1/egr;
    return $decoded;
}

# The internal algorithm of version_gt() is copy and pasted directly from the
# Sort::Versions CPAN module's versioncmp() function. We copy and paste this
# here instead of depending on Sort::Versions as we don't wish for sbozyp to
# have any dependencies. Note that sbotools also uses Sort::Versions for version
# comparisons.
sub version_gt {
    my ($v1, $v2) = @_;
    my @v1 = ($v1 =~ /([-.]|\d+|[^-.\d]+)/g);



( run in 3.157 seconds using v1.01-cache-2.11-cpan-600a1bdf6e4 )