Skip to content

rpillar/PKI

Repository files navigation

PKI

A small app used to display info on the quality of your perl code with links to module POD / info. Built using Mojolicious and inspired in part by Dave Cross.

The parsing of the modules to pull out inheritance / dependency data is based on work found here - http://technix.github.io/Perl-Analyzer/

Notes

To initialize the database (sqlite) start sqlite - sqlite3 critic.db - and at the sqlite prompt run - .read initial.sql.

The config file - ./script/modulelib.conf - holds the full path to libraries that are parsed during the runnning of the perl_files.pl script. When the app is running the possible location of the modules that are parsed for POD may be different - use ./script/runlib.conf to ensure that (if there are differences) these are picked up.

As an example of this difference - for the Dancer web framework the git data would be downloaded from https://github.com/PerlDancer/Dancer.git and the source code (for POD) is downloaded from CPAN (https://metacpan.org/pod/Dancer).

./script/modulelib.conf

{
    "libs":  [ "<full path to /lib - add as many as you want>" ],
    "git": "<full path to the 'base' of your 'local' git repo>"
}

./script/runlib.conf

{
    "libs":  [ "<full path to /lib - add as many as you want>" ]
}

Install any requested / missing modules using cpanm.

To run

To run the script to parse files / collect data :-

> perl ./script/perl_files.pl

To run the app - at the command line :-

> morbo -l http://localhost:3020 ./script/pki

Updates

  • refactor Controller code - introduce a Service layer that will contain the code to get the data - create a thin controller.
  • Add code to process roles - with / also require
  • Collect and display info about where a module is used / add complexity scores and other info to the INFO tab.
  • Add module dependency graphs
  • Fix links within POD
  • Add flag so that interface / scripts only process source files - not GIT

Further Notes

This code tries to provide a way of viewing information about the code base that is pointed at. If you would like to just see the complexity scores using Perl::Metrics::Simple then :-

use Perl::Metrics::Simple;

my $analyzer = Perl::Metrics::Simple->new;

About

A small app used to display info on the quality of your perl code with links to module POD. Built using Mojolicious.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published