NAME
Sumu Perl Modules
VERSION
version 0.4.9
SYNOPSIS
Usage:
In a full mojo app
my $module = $c->param('module');
chomp $module;
my $modules = Sumu::Perl::Modules->new();
my ($mod, $dirs, $files) = $modules->_dirs(current_user => $current_user, module => "$module");
my ($mod, $out) = $modules->_doc( module => "$module" );
For /_inc_dir
my $module = $c->param('module');
my $out = $modules->_inc_dir( inc_dir => "$module")
DESCRIPTION
List all installed Perl Modules on your system
For Developer
Being tested in:
Ubuntu 22.04 (WSL):
Dist:
Folder/Path:
~/p/perl/Sumu-Perl-Modules
GitLab Repo:
http://ns44:40225/ns21u2204/sumu-perl-modules-dist-zilla
UI:
Folder/Path:
~/p/perl/Perl-Modules-Companion
GitLab Repo:
http://ns44:40225/ns21u2204/sumu-perl-modules-companion
Rocky Linux 9 (Hyper-V):
Dist:
UI:
Strictures
Enable strict and warnings
our VERSION
our $VERSION = '0.4.9'
This version number is updated automatically!
Internals
Exporter
sub NAME
Returns NAME:
The name of the app/module
Sub new
Bless the classes
Required Modules
Eporter
ExtUtils::Installed
Pod::Html;
Sub _extutils
Returns List of modules as a table
including version number and number of dirs/files under given module
Usage:
my $modules_list = $modules->_extutils( module => "$module" );
Sub _dirs
Show/Get Dirs in a given module
Returns an ordered list
Usage:
my ($module, $dirs, $files) = $modules->_dirs( module => "$module");
Sub _doc
Show Doc for a given module
Returns results from command
perldoc Module
as text with a line break (<br>) appended to end of each line
Usage:
my ($total_lines, $out, $error) = $modules->_doc( module => "$module" );
Sub _inc
List all directories in the @INC
Returns an ordered list
with link to given URL
default is '/_inc_dir'
see sub _inc_dir
Creates URLs like the following:
<a
href="http://loclhost:20202/_inc_dir//home/ns21u2204/perl5/perlbrew/perls/perl-5.38.0/lib/5.38.0/x86_64-linux"
title="x86_64-linux"
>
x86_64-linux
</a>
<a
href="http://UxUrl/_inc_dir//home/ns21u2204/p/perl/Perl-Modules-Companion/lib"
title="lib"
>
lib
</a>
Usage:
my $out = $modules->_inc( module = "$module" );
Sub _inc_dir
Do stuff with a given directory path from the @INC
Show files and subdirectories in the given dir.
Given directory should be an absolute path
Usage:
In a full mojo app
my $modules = Sumu::Perl::Modules->new();
my $module = $c->param('module');
my $out = $modules->_inc_dir( inc_dir => "$module")