Skip to content

Instantly share code, notes, and snippets.

View jonasbn's full-sized avatar
🤚
keeping my distance

Jonas Brømsø jonasbn

🤚
keeping my distance
View GitHub Profile
@jonasbn
jonasbn / file.pl
Created July 31, 2014 13:55
Perl script
#!/usr/bin/env perl
use strict;
use warnings;
exit 0;
@jonasbn
jonasbn / 00-compile.t
Created July 31, 2014 14:23
Perl test to compile contents of lib/
#!/usr/bin/env perl
#Courtesy of Ovid
#Ref: http://use.perl.org/~Ovid/journal/37797
use strict;
use warnings;
use File::Find;
use File::Spec;
@jonasbn
jonasbn / critic.t
Last active August 29, 2015 14:04
Perl::Critic tests
# Courtesy of Jeffrey Ryan Thalhammer
# http://search.cpan.org/~thaljef/Test-Perl-Critic/lib/Test/Perl/Critic.pm
use strict;
use warnings;
use File::Spec;
use Test::More;
use English qw(-no_match_vars);
if ( not $ENV{TEST_CRITIC} ) {
@jonasbn
jonasbn / kwalitee.t
Created July 31, 2014 14:26
Test::Kwalitee tests
use strict;
use warnings;
BEGIN {
unless ( $ENV{RELEASE_TESTING} ) {
use Test::More;
plan( skip_all => 'these tests are for release candidate testing' );
}
}
@jonasbn
jonasbn / pod-coverage.t
Created July 31, 2014 14:28
Pod::Coverage tests
#pod test courtesy of petdance
#http://use.perl.org/~petdance/journal/17412
use Test::More;
eval "use Test::Pod::Coverage 0.08";
plan skip_all => "Test::Pod::Coverage 0.08 required for testing POD coverage" if $@;
all_pod_coverage_ok();
@jonasbn
jonasbn / pod-syntax.t
Last active August 29, 2015 14:04
Test::Pod test (pod syntax test)
use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => 'Test::Pod 1.14 required' if $@;
plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
all_pod_files_ok();
@jonasbn
jonasbn / Module-Build.sublime-build
Created August 1, 2014 08:28
Module::Build build system for SublimeText
{
"build_systems":
[
{
"name": "Module::Build",
"cmd": ["perl Build.PL --verbose=1 ; ./Build"],
"working_dir": "${project_path:${folder}}",
"selector": "source.perl",
"shell": true,
@jonasbn
jonasbn / changes.t
Created August 2, 2014 20:59
Test::CPAN::Changes test
use strict;
use warnings;
use Test::More;
eval 'use Test::CPAN::Changes';
plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
changes_ok();
@jonasbn
jonasbn / critic.t
Created August 2, 2014 21:00
Test::Perl::Critic test
# Courtesy of Jeffrey Ryan Thalhammer
# http://search.cpan.org/~thaljef/Test-Perl-Critic/lib/Test/Perl/Critic.pm
# The severity parameter interpretation was added by jonasbn
# See: http://logiclab.jira.com/wiki/display/OPEN/Test-Perl-Critic
use strict;
use warnings;
use File::Spec;
use Test::More;
@jonasbn
jonasbn / build-cpanfile.sh
Created August 14, 2014 12:28
Build a cpanfile file from Module::Build requirements specified in Build.PL
#!/bin/bash
./Build prereq_report | perl -pi -e 'm/([\w:]+)\s+([\d\.]+)\s+/; if ($1) { print STDERR "requires '\''$1'\''"; print STDERR ", '\''$2'\''" if $2; print STDERR ";\n" }' > /dev/null