Pinto
CPAN in a Box
What is Pinto
- Author: Jeffery Ryan Thalhammer
- create/manage custom CPAN like repo
- provides a method of creating stacks of modules
- install modules just like you would with CPAN
Why use Pinto
- CPAN authors can make mistakes
- Pinto allows for creating unique stacks (indexes)
- Pinto allows for working with CPAN modules and local modules
- Pinto has logging
What Pinto Doesn't Do
- enforce security
- enforce author permissions
- v. 0.09996
Pinto Help
- pinto commands
- pinto help <COMMAND>
- pinto manual <COMMAND>
Your Pinto Repository
- Create your repo
pinto --root ~/repo init
pinto -r ~/repo init
export PINTO_REPOSITORY_ROOT=~/repo
pinto init
Your Pinto Repository
- Add a module from CPAN
pinto -r ~/repo pull Test::More
- Add your module
pinto -r ~/repo add ~/src/My-App-0.081.tar.gz
What's in your repo
- pinto -r ~/repo list
erik.tank $ pinto -r ~/repo list
[rl-] My::App 0.081 ERIKTANK/My-App-0.081.tar.gzPulled but nothing
- pinto -r ~/repo pull Test::More
erik.tank $ pinto -r ~/repo pull Test::More
Skipping Test::More~0: included in perl 5.016002 core
No changes were madeYour Pinto Repository
Text
[rl-] My::App 0.081 ERIKTANK/My-App-0.081.tar.gz
[rf-] URI 1.65 ETHER/URI-1.65.tar.gz
[rf-] URI::Escape 3.31 ETHER/URI-1.65.tar.gz
[rf-] URI::Heuristic 4.20 ETHER/URI-1.65.tar.gz
[rf-] URI::IRI 0 ETHER/URI-1.65.tar.gz
[rf-] URI::QueryParam 0 ETHER/URI-1.65.tar.gz
[rf-] URI::Split 0 ETHER/URI-1.65.tar.gz
[rf-] URI::URL 5.04 ETHER/URI-1.65.tar.gz
[rf-] URI::WithBase 2.20 ETHER/URI-1.65.tar.gz
[rf-] URI::data 1.65 ETHER/URI-1.65.tar.gz
pinto -r ~/repo pull URI
Stacks
- stacks are indexes
- have as many as you want
- default stack is 'master'
pinto -r ~/repo new dev
pinto -r ~/repo copy master dev
pinto -r ~/repo stacks
backup Feb 4, 2015 9:09:07 PM erik.tank ccf6d4c7: Pull MAKAMAKA/JSON-2.90.tar.gz
dev Feb 4, 2015 9:41:39 PM erik.tank 3313a5ba: Add ERIKTANK/My-App-0.082.tar....
* master Feb 4, 2015 9:41:08 PM erik.tank 85ec1865: Unpin ERIKTANK/My-App-0.081.ta...Stacks (now what)
- Add new module
pinto -r ~/repo pull JSON~2.90 --stack dev
pinto -r ~/repo add ~/src/My-App-0.082.tar.gz
pinto -r ~/repo list --stack dev
[rf-] JSON 2.90 MAKAMAKA/JSON-2.90.tar.gz
[rl!] My::App 0.081 ERIKTANK/My-App-0.081.tar.gz
[rf-] URI 1.65 ETHER/URI-1.65.tar.gz
[rf-] URI::Escape 3.31 ETHER/URI-1.65.tar.gz
[rf-] URI::Heuristic 4.20 ETHER/URI-1.65.tar.gz
[rf-] URI::IRI 0 ETHER/URI-1.65.tar.gz
Stacks
What have I changed?
pinto -r ~/repo diff master dev
--- master
+++ dev
+[rf-] MAKAMAKA/JSON-2.90.tar.gz
-[rl-] ERIKTANK/My-App-0.081.tar.gz
+[rl-] ERIKTANK/My-App-0.082.tar.gz
Installing
pinto -r ~/repo install --stack dev My::App
cpanm --mirror file:///repo --mirror-only My::App
cpanm --mirror file:///repo/stacks/dev --mirror-only My::App
Installing it all
pinto root --stack dev
pinto root --stack dev | cpanm --mirror file:://repo/stacks/dev
ERIKTANK/My-App-0.082.tar.gz
ETHER/URI-1.65.tar.gz
MAKAMAKA/JSON-2.90.tar.gzPins
Pin a module to stop upgrading
pinto -r ~/repo pin My::App
pinto -r ~/repo unpin My::App
Logs
What has been happening with my repo?
pinto -r ~/repo log --stack dev
revision 3313a5ba-7569-4dba-baf6-d5b4cd09a52f
Date: Feb 4, 2015 9:41:39 PM
User: erik.tank
Add ERIKTANK/My-App-0.082.tar.gz
revision fd0b9b7a-86cb-4498-bc6b-e6e84c95415a
Date: Feb 4, 2015 9:41:31 PM
User: erik.tank
Unpin ERIKTANK/My-App-0.081.tar.gz
revision ccf6d4c7-5975-4133-9da2-4e023a8ee85d
Date: Feb 4, 2015 9:09:07 PM
User: erik.tank
Pull MAKAMAKA/JSON-2.90.tar.gz
Extras - Revert
pinto -r ~/repo revert
pinto -r ~/repo revert b59a08a5
Extras - pintod
- Web interface to your Pinto repo
- API to manage and inspect your repo
- PSGI compatible (Plack::Runner on Starman)
- Can implement an authentication scheme
Extras - Stratopan
- stratopan.com
- Web service built for Pinto
- Create private/public repos
- Full control as if it's on your own machine
- Access control
Extras
- App::Pinto::Command::doc
- Bash::Completion::Plugins::pinto
- Pinto::Remote
Resources
- This presentation: https://slides.com/skeletonkey/pinto
- man Pinto::Manual::Introduction
- man Pinto::Manual::Installing
- man Pinto::Manual::Tutorial
- man Pinto::Manual::Quickstart
- http://perlmaven.com/pinto-tutorial
Pinto - CPAN in a Box
By skeletonkey
Pinto - CPAN in a Box
Pinto - an introduction to creating your own/local CPAN like repository of modules.
- 606