Skip to content

Latest commit

 

History

History
116 lines (87 loc) · 2.01 KB

File metadata and controls

116 lines (87 loc) · 2.01 KB

Setup Dev Enviornment

Install Perl locally using Perlbrew

See https://perlbrew.pl/

Fetch perlbrew:

> curl -L https://install.perlbrew.pl | bash

Once installed, add "source ~/perl5/perlbrew/etc/bashrc" to .bashrc.

Install local version of Perl:

> perlbrew install perl-5.6.16
> perlbrew switch perl-5.6.16

Install cpanm

> perlbrew install-cpanm

Install dependencies into local perl

> cpanm install Module::Build
> cpanm --installdeps .
> cpanm install Software::License

Development

Hack on project and test locally:

> perl Build.PL && ./Build && ./Build test

If it has been a while since the last version, update dependencies:

> cpan -u

Publish Module to CPAN

Prepare

Generate 'Build' script:

> perl Build.PL

Edit MANIFEST.SKIP if needed, add #!include_default to top. Be sure not to check in the expanded version into git.

> vi MANIFEST.SKIP
> ./Build manifest

Bump version number -- Build.PL uses dist_version_from to find it:

> vi lib/LabKey/Query.pm

Update copyright year (LICENSE will be autogenerated):

> vi lib/LabKey/Query.pm

Update Changes file:

> vi Changes

Generate README.pod for nice viewing on github:

> podselect lib/LabKey/Query.pm > README.pod

Clean up 'Build' and distribution artifacts:

> ./Build distclean

Generate metadata files and dist (META.yml, META.json, LICENSE, LabKey-Query-0.00.tar.gz):

> perl Build.PL
> ./Build dist

Push changes

Commit, tag, push:

> git commit
> git tag v<version>  # e.g. v1.06
> git push --tags -u origin master

Publish to CPAN

Upload the distro using CPAN::Uploader

> cpanm install CPAN::Uploader
> cpan-upload LabKey-Query-v<version>.tar.gz --user labkey

Fun sites: