1

I have a perl library that I want to make accessible to others (to accompany an R package I'm developing). I currently have my library - vcfParser - in a directory called bin in my working directory. In another script callParser.pl I tell perl where to find the library, and then I call one of the functions later in the script.

vcfParser.pm

#!/usr/bin/perl

package vcfParser;

{...}

1;

callParser.pl

#!/usr/bin/perl
use warnings;
use strict;

use FindBin qw($Bin);
use File::Spec;
use lib File::Spec->catdir($FindBin::Bin, 'bin/');

use vcfParser;

This approach works, but relies on my library being in the bin directory.

I would like to have this easily available for others to use as a standalone module. Is there a way to make a perl library available from a Github repository?

If not, what's the most suitable way for me to allow others to easily install my library?

In R packages from Github are commonly installed using:

library(devtools)
install_github("fugu/myProject")
library(myProject)
fugu
  • 6,417
  • 5
  • 40
  • 75
  • 2
    Make a package in exactly the same way that you would if you wanted to publish on CPAN. Then put it on Github. (But seriously consider publishing to CPAN too) – Quentin Aug 10 '17 at 14:56
  • `git clone ... && cd ... && cpanm --installdeps . && cpanm .` – stevieb Aug 10 '17 at 15:00

0 Answers0