Config-Perl

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "PPI" : "0",
            "perl" : "5.006000",
            "warnings::register" : "0"
         },
         "suggests" : {}
      },
      "test" : {
         "requires" : {
            "File::Temp" : "0",
            "FindBin" : "0",
            "Test::Fatal" : "0",
            "Test::More" : "0",
            "base" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "https://github.com/haukex/Config-Perl/issues"
      },

META.yml  view on Meta::CPAN

---
abstract: 'Perl extension for parsing configuration files written in a subset of Perl and (limited) undumping of data structures (via PPI, not eval)'
author:
  - 'Hauke D <haukex@zero-g.net>'
build_requires:
  ExtUtils::MakeMaker: '0'
  File::Temp: '0'
  FindBin: '0'
  Test::Fatal: '0'
  Test::More: '0'
  base: '0'
configure_requires:
  ExtUtils::MakeMaker: '6.64'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'

Makefile.PL  view on Meta::CPAN

		# CPAN
		'PPI'                    => 0,
		# Perl core modules
		'Exporter'               => 0,
		'Carp'                   => 0,
		'warnings::register'     => 0,
		'Data::Dumper'           => 0,
	},
	TEST_REQUIRES  => {
		# CPAN
		'Test::Fatal'            => 0,
		# Perl core modules
		'Test::More'             => 0,
		'FindBin'                => 0,
		'base'                   => 0, # "parent" pragma wasn't core until 5.10.1
		'File::Temp'             => 0,
		# note I haven't included modules needed for author tests here
	},
);

t/10_basic.t  view on Meta::CPAN

# For more information see the "Perl Artistic License",
# which should have been distributed with your copy of Perl.
# Try the command "perldoc perlartistic" or see
# http://perldoc.perl.org/perlartistic.html .

use FindBin ();
use lib $FindBin::Bin;
use Config_Perl_Testlib;

use Test::More;
use Test::Fatal 'exception';
use File::Temp 'tempfile';

use Config::Perl;

# ### Basics & Structure ###

test_ppconf q{ $foo="bar"; }, { '$foo'=>"bar" }, 'basic test';
test_ppconf q{ $foo="bar" }, { '$foo'=>"bar" }, 'no semicolon';
test_ppconf q{ our $foo="bar"; }, { '$foo'=>"bar" }, '"our"';
test_ppconf q{ our $foo=123; }, { '$foo'=>123 }, 'number';

t/20_undump.t  view on Meta::CPAN

# For more information see the "Perl Artistic License",
# which should have been distributed with your copy of Perl.
# Try the command "perldoc perlartistic" or see
# http://perldoc.perl.org/perlartistic.html .

use FindBin ();
use lib $FindBin::Bin;
use Config_Perl_Testlib;

use Test::More;
use Test::Fatal 'exception';

use Data::Dumper ();

# Data::Undump::PPI used to support Data::Dump, but since that support was
# only partial, I've disabled it completely for now to avoid confusion.
# Also, since the output of Data::Dumper with the Terse option is often
# indistinguishable from Data::Dump, this means Terse is currently not supported.
our $HAVE_DATA_DUMP;
$HAVE_DATA_DUMP = 0;
#BEGIN { $HAVE_DATA_DUMP = eval q{ use Data::Dump 'pp'; 1 } };  ## no critic (ProhibitStringyEval)

t/21_undump_files_dump.t  view on Meta::CPAN

# For more information see the "Perl Artistic License",
# which should have been distributed with your copy of Perl.
# Try the command "perldoc perlartistic" or see
# http://perldoc.perl.org/perlartistic.html .

use FindBin ();
use lib $FindBin::Bin;
use Config_Perl_Testlib;

use Test::More;
use Test::Fatal 'exception';
use File::Temp 'tempfile';

BEGIN {
	use_ok('Data::Undump::PPI','Undump','Dump');
}

## no critic (RequireCarping)

my $string = <<'END_EXAMPLE';
#!perl

t/30_errors_warns.t  view on Meta::CPAN

# For more information see the "Perl Artistic License",
# which should have been distributed with your copy of Perl.
# Try the command "perldoc perlartistic" or see
# http://perldoc.perl.org/perlartistic.html .

use FindBin ();
use lib $FindBin::Bin;
use Config_Perl_Testlib;

use Test::More;
use Test::Fatal 'exception';

use Config::Perl;
use Data::Undump::PPI;

my $cp = Config::Perl->new;

# Error Tests

like exception { Config::Perl->new('foo','bar') },
	qr/\bunknown argument\b/, 'bad args to new';

t/80_wishlist.t  view on Meta::CPAN

# For more information see the "Perl Artistic License",
# which should have been distributed with your copy of Perl.
# Try the command "perldoc perlartistic" or see
# http://perldoc.perl.org/perlartistic.html .

use FindBin ();
use lib $FindBin::Bin;
use Config_Perl_Testlib;

use Test::More;
use Test::Fatal 'exception';

use Config::Perl;

# A wishlist / idea collection

TODO: { todo_skip "push not yet implemented", 11*2;

test_ppconf q{ our @x=qw/a b/; push @x, "c"; }, { '@x'=>['a','b','c'] }, 'push literal';
test_ppconf q{ our @x=qw/a b/; push(@x,"c"); }, { '@x'=>['a','b','c'] }, 'push as function';
test_ppconf q{ our @x=qw/a b/; push @x, "c", "d"; }, { '@x'=>['a','b','c','d'] }, 'push 2 literals';



( run in 1.288 second using v1.01-cache-2.11-cpan-54e63673c56 )