Skip to content
Browse files

s/CPAN::cpanfile/Module::CPANfile/

  • Loading branch information...
1 parent 584617e commit 70b65a7501f01f2be0c25d18e1ab75daf29da5e3 @miyagawa committed
View
6 MANIFEST
@@ -1,9 +1,9 @@
Changes
-lib/CPAN/cpanfile.pm
-lib/CPAN/cpanfile/Environment.pm
-lib/CPAN/cpanfile/Result.pm
lib/cpanfile-faq.pod
lib/cpanfile.pod
+lib/Module/CPANfile.pm
+lib/Module/CPANfile/Environment.pm
+lib/Module/CPANfile/Result.pm
Makefile.PL
MANIFEST This list of files
README.md
View
4 Makefile.PL
@@ -1,8 +1,8 @@
use ExtUtils::MakeMaker;
WriteMakefile(
- NAME => 'CPAN::cpanfile',
- VERSION_FROM => 'lib/CPAN/cpanfile.pm',
+ NAME => 'Module::CPANfile',
+ VERSION_FROM => 'lib/Module/CPANfile.pm',
ABSTRACT => 'A format for describing CPAN dependencies of Perl applications',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => 6.31,
View
14 lib/CPAN/cpanfile.pm → lib/Module/CPANfile.pm
@@ -1,8 +1,8 @@
-package CPAN::cpanfile;
+package Module::CPANfile;
use strict;
use warnings;
use Cwd;
-use CPAN::cpanfile::Environment;
+use Module::CPANfile::Environment;
our $VERSION = '0.9003';
@@ -23,7 +23,7 @@ sub parse {
my $self = shift;
my $file = Cwd::abs_path($self->{file});
- $self->{result} = CPAN::cpanfile::Environment::parse($file) or die $@;
+ $self->{result} = Module::CPANfile::Environment::parse($file) or die $@;
}
sub prereq {
@@ -43,18 +43,18 @@ __END__
=head1 NAME
-CPAN::cpanfile - Parse cpanfile
+Module::CPANfile - Parse cpanfile
=head1 SYNOPSIS
- use CPAN::cpanfile;
+ use Module::CPANfile;
- my $file = CPAN::cpanfile->load("cpanfile");
+ my $file = Module::CPANfile->load("cpanfile");
my $meta = $file->prereqs; # CPAN::Meta::Prereqs object
=head1 DESCRIPTION
-CPAN::cpanfile is a tool to handle L<cpanfile> format to load application
+Module::CPANfile is a tool to handle L<cpanfile> format to load application
specific dependencies, not just for CPAN distributions.
=head1 AUTHOR
View
10 lib/CPAN/cpanfile/Environment.pm → lib/Module/CPANfile/Environment.pm
@@ -1,6 +1,6 @@
-package CPAN::cpanfile::Environment;
+package Module::CPANfile::Environment;
use strict;
-use CPAN::cpanfile::Result;
+use Module::CPANfile::Result;
my @bindings = qw(
on requires recommends suggests conflicts
@@ -14,7 +14,7 @@ sub import {
my($class, $result_ref) = @_;
my $pkg = caller;
- $$result_ref = CPAN::cpanfile::Result->new;
+ $$result_ref = Module::CPANfile::Result->new;
for my $binding (@bindings) {
no strict 'refs';
*{"$pkg\::$binding"} = sub { $$result_ref->$binding(@_) };
@@ -34,10 +34,10 @@ sub parse {
{
local $@;
$res = eval sprintf <<EVAL, $file_id++;
-package CPAN::cpanfile::Sandbox%d;
+package Module::CPANfile::Sandbox%d;
my \$_result;
no warnings;
-use CPAN::cpanfile::Environment \\\$_result;
+use Module::CPANfile::Environment \\\$_result;
$code;
View
2 lib/CPAN/cpanfile/Result.pm → lib/Module/CPANfile/Result.pm
@@ -1,4 +1,4 @@
-package CPAN::cpanfile::Result;
+package Module::CPANfile::Result;
use strict;
sub new {
View
6 t/parse.t
@@ -1,5 +1,5 @@
use strict;
-use CPAN::cpanfile;
+use Module::CPANfile;
use Test::More;
use Cwd;
use File::Basename qw(dirname);
@@ -10,7 +10,7 @@ eval { require CPAN::Meta::Prereqs; 1 }
{
eval {
- my $file = CPAN::cpanfile->load;
+ my $file = Module::CPANfile->load;
};
like $@, qr/No such file/;
}
@@ -36,7 +36,7 @@ test_requires 'Test::Warn', 0.1;
author_requires 'Module::Install', 0.99;
FILE
- my $file = CPAN::cpanfile->load;
+ my $file = Module::CPANfile->load;
my $prereq = $file->prereq;
is_deeply $prereq->as_string_hash, {

0 comments on commit 70b65a7

Please sign in to comment.
Something went wrong with that request. Please try again.