Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hello esteemed Monks,

A few months ago, I was tasked with building a private CPAN for a new client. I had already done this a couple times before using CPAN::Site or CPAN::Mini, but I was never really happy with the results. So this time, I started from scratch. The result is called Pinto, and it is now available on CPAN. Pinto is inspired by CPAN::Mini, CPAN::Mini::Inject, and OrePAN, but adds several interesting features (listed below).

So I invite you to kick the tires on Pinto and give me your feedback. Beware that Pinto has a lot of dependencies, and I'm still not sure what the minimum versions should be. So I recommend brewing a fresh perl or using the -L option with cpanm(1) to install Pinto into a clean (and separate) sandbox. Pinto is still alpha code and subject to change in incompatible ways. And make sure you get the 0.026 version.

  • Pinto supports several usage patterns: With Pinto, you can create a repository that mirrors all the latest distributions from CPAN. Or you can create a repository with just your own private distributions. Or you can create a repository that has all the distributions required for a particular project. Or you can combine any of the above patterns.

  • Pinto supports adding and removing distributions in the repository: Pinto gives you the power to precisely tune the contents of your repository. For example, you can add your own locally patched CPAN distribution, and then remove it when the original author releases a fixed version.

  • Pinto helps you avoid breakage due to upgrades: Pinto lets you pin your repository index to a particular version of a package, so that you can hold that package at the last know working version, while allowing other packages to be upgraded.

  • Pinto can be integrated with your version control system: Pinto can automatically commit to your version control system whenever the contents of the repository changes. This gives you reproducible and identifiable snapshots of your dependencies, and a mechanism for rollback when things go wrong.

  • Pinto makes it easier to build several local repositories: Creating new Pinto repositories is easy, and each has its own configuration. So you can have different repositories for each department, or each project, or each version of perl, or each customer, or whatever you want.

  • Pinto can pull distributions from multiple remote repositories: Pinto can mirror or import distributions from multiple sources, so you can create private (or public) networks of repositories that enable separate teams or individuals to share distributions.

  • Pinto supports team development: Pinto is suitable for small to medium-sized development teams, where several developers might contribute new distributions at the same time. Pinto ensures that concurrent users don't clobber each other.

  • Pinto has a robust command line interface: The pinto-admin command line tool has options to control every aspect of your Pinto repository. It is well documented and behaves in a DWIM fashion.

  • Pinto can be extended: You can extend Pinto by creating Pinto::Action subclasses to perform new operations on your repository, such as extracting documentation from a distribution, or grepping the source code of several distributions.

Pinto might be easiest to explain with a couple command-line demonstrations. In this first demonstration, suppose our application depends on Plack-0.98, which happens to be the latest version at that moment:

# Create an empty CPAN-like repository in directory ~/mypan $ pinto-admin -r ~/mypan create # Get the current version of Plack (and all its dependencies) into the + repository $ pinto-admin -r ~/mypan import Plack # Suppose HTTP::Simple has a bug and you made your own patch as HTTP-S +imple-0.23-PATCHED.tar.gz $ pinto-admin -r ~/mypan add HTTP-Simple-0.23-PATCHED.tar.gz # Point cpan(1) or cpanm(1) at your repository, to install Plack with +your patched HTTP::Simple # cpanm --mirror file:///home/you/mypan --mirror-only Plack # Time passes...and now we decide we want to upgrade the latest Plack, + which is now Plack-2.4 $ pinto-admin -r ~/mypan import Plack-2.4 # It seems that bug in HTTP::Simple has now been fixed. So we can rem +ove our patched version $ pinto-admin -r ~/mypan remove HTTP-Simple-0.23-PATCHED.tar.gz

For this next demonstration, suppose we want to have the latest version of everything in CPAN:

# Create a new repository (or you can use an existing one) $ pinto-admin -r ~/mypan create # Get the latest version of ALL packages from a CPAN (may take a coupl +e hours) $ pinto-admin -r ~/mypan mirror # Now we have a stable snapshot of CPAN we can install from $ cpanm --mirror file:///home/you/mypan --mirror-only Catalyst Moose P +erl::Critic # Time we want to bring our snapshot up to date with the +tip of CPAN $ pinto-admin -r ~/mypan mirror # But wait! The new Moose-2.1 breaks our code. We want to stay with +our old Moose-1.4 $ pinto-admin -r ~/mypan pin Moose-1.4 # More time passes...We've fixed our code to work with Moose-2.1 $ pinto-admin -r ~/mypan unpin Moose

You can actually combine these scenarios in various ways too. At the end of the day, Pinto provides you with a stable, cherry-picked slice of CPAN that you can systematically evolve over time. I'm still figuring out how best to apply that capability. Your insights are much appreciated.

Jeffrey Thalhammer
Imaginative Software Systems

In reply to Announce: Pinto-0.026 -- Curate Your Own CPAN Repository by jthalhammer

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Copacetic]: I tried last night, and also this afternoon. I did include a link to CPAN originally, but I tried without it both times.
    [choroba]: Can you copy the text to Copacetic's scratchpad ?

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (10)
    As of 2017-05-26 14:57 GMT
    Find Nodes?
      Voting Booth?