https://github.com/rpillar/pki
A small app used to display info on the quality of your perl code with links to module POD. Built using Mojolicious.
https://github.com/rpillar/pki
mojolicious perl quality
Last synced: 5 months ago
JSON representation
A small app used to display info on the quality of your perl code with links to module POD. Built using Mojolicious.
- Host: GitHub
- URL: https://github.com/rpillar/pki
- Owner: rpillar
- Created: 2019-11-29T11:15:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-26T20:21:45.000Z (over 1 year ago)
- Last Synced: 2025-04-30T12:55:59.504Z (about 1 year ago)
- Topics: mojolicious, perl, quality
- Language: JavaScript
- Homepage:
- Size: 3.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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/config/modulelib.conf`
```
{
"libs": [ "" ],
"git": ""
}
```
### `./script/config/runlib.conf`
```
{
"libs": [ "" ]
}
```
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.
- investigate whether the POD generation can be replaced with `App::sdview`
- Add code to process roles - *with* / also *require*
- distinguish between internal / external dependencies
- when you have code from multiple repos then distinguish between them
- Add module dependency graphs
- Fix links within POD
- Add flag so that interface / scripts *only* process source files - not GIT
- Would it be possible - add a process that will analyse scripts for POD and allow the "user' to
document dependencies / tables used and updated etc.
- Make Perl::Critic settings 'flexible' - create a 'settings' function where the 'user' could set the location of _critic_ file (env var `PERLCRITIC`) or state the _theme_ required. A settings _function_ could support user settings for other _things_.
- possible bug when rerunning the _main_ script without the `initialize` option - subroutine data duplicated - check.
- create a _reporting_ tab - would display _general_ info on the source code being _viewed_.
- complexity _history_ - module / script change metrics
- migrate to `materializeweb` (`materializecss` is not being maintained).
# 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;
```