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)