Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/motemen/universal-perldoc

open perldoc from your code or repl
https://github.com/motemen/universal-perldoc

Last synced: about 2 months ago
JSON representation

open perldoc from your code or repl

Awesome Lists containing this project

README

        

package UNIVERSAL::perldoc;
use strict;
use warnings;
use autodie ':all';

our $VERSION = '0.01';

*UNIVERSAL::perldoc = \&perldoc
unless defined &UNIVERSAL::perldoc;

sub perldoc {
my ($module, @args) = @_;
$module = ref $module if ref $module;
push @args, $module;
system 'perldoc', @args;
}

1;

__END__

=head1 NAME

UNIVERSAL::perldoc - Browse target module's perldoc from your code (or repl)

=head1 SYNOPSIS

use UNIVERSAL::perldoc;

Some::Module->perldoc; # opens perldoc

=head1 DESCRIPTION

UNIVERSAL::perldoc invokes C about the module whose perldoc method was
called.

=head1 AUTHOR

motemen [email protected]

=head1 SEE ALSO

L

=head1 LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut