App-PODUtils
view release on metacpan or search on metacpan
script/podless view on Meta::CPAN
#!perl
our $DATE = '2021-07-20'; # DATE
our $VERSION = '0.050'; # VERSION
use 5.010;
use strict;
use warnings;
use App::PODUtils;
use Perinci::CmdLine::Any;
our %SPEC;
$SPEC{podless} = {
v => 1.1,
summary => 'Show Perl POD source code with `less`',
args => {
pod => $App::PODUtils::arg_pod_single,
},
deps => {
prog => 'less',
},
};
sub podless {
require Module::Path::More;
my %args = @_;
my $pod = $args{pod};
my $ppath = Module::Path::More::module_path(
module => $pod, find_pm=>0, find_pmc=>0, find_pod=>1, find_prefix=>0);
if (defined $ppath) {
system "less", $ppath;
[200, "OK"];
} else {
[404, "Can't find pod $pod"];
}
}
Perinci::CmdLine::Any->new(
url => '/main/podless',
)->run;
# ABSTRACT: Show Perl POD source code with `less`
# PODNAME: podless
__END__
=pod
=encoding UTF-8
=head1 NAME
podless - Show Perl POD source code with `less`
=head1 VERSION
This document describes version 0.050 of podless (from Perl distribution App-PODUtils), released on 2021-07-20.
=head1 SYNOPSIS
Basic usage:
% podless Some::Pod
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--pod>=I<s>*
Can also be specified as the 1st command-line argument.
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
=item B<--no-config>, B<-C>
Do not use any configuration file.
( run in 0.754 second using v1.01-cache-2.11-cpan-39bf76dae61 )