App-Pmhack

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

requires:
  Carp: 0
  English: 0
  File::Copy: 0
  File::Path: 2.07
  Module::Load: 0
  Module::Locate: 0
  Params::Util: 0
  Perl6::Export::Attrs: 0
  Pod::Usage::CommandLine: 0
  Try::Tiny: 0
version: 0.002

Makefile.PL  view on Meta::CPAN

  'PREREQ_PM' => {
    'Carp' => '0',
    'English' => '0',
    'File::Copy' => '0',
    'File::Path' => '2.07',
    'Module::Load' => '0',
    'Module::Locate' => '0',
    'Params::Util' => '0',
    'Perl6::Export::Attrs' => '0',
    'Pod::Usage::CommandLine' => '0',
    'Try::Tiny' => '0'
  },
  'VERSION' => '0.002',
  'test' => {
    'TESTS' => 't/*.t'
  }
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};

lib/App/Pmhack.pm  view on Meta::CPAN

use warnings;

use Perl6::Export::Attrs;
use English        qw($OSNAME);
use Carp           qw(carp croak);
use File::Copy     qw(copy);
use Module::Load   qw();
use Module::Locate qw();
use File::Path     qw();
use Params::Util   qw();
use Try::Tiny      qw(try catch);

sub pmhack :Export
{
	my $module_name   = Params::Util::_CLASS(shift) or croak "Please supply a valid module name";
	my $hacklib       = $ENV{PERL5HACKLIB}          or croak "PERL5HACKLIB environment variable not set, aborting";
	
	# SAMPLE VALUES
	# =============
	# $module_name:     Some::Interesting::Module
	# $inc_filename:    /usr/lib/perl5/Some/Interesting/Module.pm

t/01-basic.t  view on Meta::CPAN


use strict;
use warnings;

use Test::More tests => 3;
use Test::Differences;
use FindBin;
use File::Temp qw(tempdir);
use File::Spec;
use File::Slurp qw(slurp);
use Try::Tiny;
use App::Pmhack qw(pmhack);

# setup
my $lib = File::Spec->catdir($FindBin::Bin, 'lib');
my $original_filename = File::Spec->catfile($lib, qw( App Pmhack Test.pm ));
my $original_file = slurp($original_filename);
my $module_name = "App::Pmhack::Test";
my $tempdir = tempdir();
my $targeted_filename = File::Spec->catfile($tempdir, qw( App Pmhack Test.pm ));
local $ENV{PERL5HACKLIB} = $tempdir;



( run in 0.311 second using v1.01-cache-2.11-cpan-05444aca049 )