r3207 - in /packages/libconfig-auto-perl/trunk: Changes MANIFEST
META.yml Makefile.PL debian/changelog debian/compat debian/control
lib/Config/Auto.pm t/xml-unavailable.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sun Jul 2 14:26:46 UTC 2006
Author: gregoa-guest
Date: Sun Jul 2 14:26:46 2006
New Revision: 3207
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3207
Log:
* New upstream release.
* Set debhelper compatibility level to 5.
* Set Standards-Version to 3.7.2 (no changes needed).
Added:
packages/libconfig-auto-perl/trunk/t/xml-unavailable.t
- copied unchanged from r3206, packages/libconfig-auto-perl/branches/upstream/current/t/xml-unavailable.t
Modified:
packages/libconfig-auto-perl/trunk/Changes
packages/libconfig-auto-perl/trunk/MANIFEST
packages/libconfig-auto-perl/trunk/META.yml
packages/libconfig-auto-perl/trunk/Makefile.PL
packages/libconfig-auto-perl/trunk/debian/changelog
packages/libconfig-auto-perl/trunk/debian/compat
packages/libconfig-auto-perl/trunk/debian/control
packages/libconfig-auto-perl/trunk/lib/Config/Auto.pm
Modified: packages/libconfig-auto-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/Changes?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/Changes (original)
+++ packages/libconfig-auto-perl/trunk/Changes Sun Jul 2 14:26:46 2006
@@ -1,3 +1,14 @@
+0.18 Wed Jun 28 12:22:29 2006
+================================
+ - Address #19938 which states that calling parse()
+ on an xml config without XML::Simple installed
+ dies ungracefully. As of this version, better
+ diagnostics will be provided.
+
+0.17 Tue May 2 14:41:18 2006
+================================
+ - Improved YAML autodetection [#18241]
+
0.15_01 Thu Aug 11 17:00:50 2005
================================
- Added experimental YAML support
Modified: packages/libconfig-auto-perl/trunk/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/MANIFEST?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/MANIFEST (original)
+++ packages/libconfig-auto-perl/trunk/MANIFEST Sun Jul 2 14:26:46 2006
@@ -2,7 +2,6 @@
lib/Config/Auto.pm
Makefile.PL
MANIFEST This list of files
-META.yml Module meta-data (added by MakeMaker)
README
t/00.load.t
t/colon.t
@@ -20,5 +19,7 @@
t/pod.t
t/resolv.t
t/winini.t
+t/xml-unavailable.t
t/xml.t
t/yaml.t
+META.yml Module meta-data (added by MakeMaker)
Modified: packages/libconfig-auto-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/META.yml?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/META.yml (original)
+++ packages/libconfig-auto-perl/trunk/META.yml Sun Jul 2 14:26:46 2006
@@ -1,12 +1,14 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Config-Auto
-version: 0.16
+version: 0.18
version_from: lib/Config/Auto.pm
installdirs: site
requires:
Config::IniFiles: 0
+ File::Spec::Functions: 0
+ Test::More: 0
YAML: 0
distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.25
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: packages/libconfig-auto-perl/trunk/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/Makefile.PL?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/Makefile.PL (original)
+++ packages/libconfig-auto-perl/trunk/Makefile.PL Sun Jul 2 14:26:46 2006
@@ -15,9 +15,11 @@
}
my $prereqs = {
- 'XML::Simple' => 0,
- 'YAML' => 0,
- 'Config::IniFiles' => 0,
+ 'XML::Simple' => 0,
+ 'YAML' => 0,
+ 'Config::IniFiles' => 0,
+ 'File::Spec::Functions' => 0,
+ 'Test::More' => 0,
};
delete $prereqs->{'XML::Simple'} unless $opts->{'x'};
@@ -26,7 +28,7 @@
'VERSION_FROM' => 'lib/Config/Auto.pm', # finds $VERSION
'PREREQ_PM' => $prereqs,
( $] >= 5.005
- ? ( ABSTRACT_FROM => 'lib/Config/Auto.pm', # retrieve abstract from module
+ ? ( ABSTRACT_FROM => 'lib/Config/Auto.pm',
AUTHOR => 'Jos I. Boumans <kane at cpan.org>')
: ()
),
Modified: packages/libconfig-auto-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/debian/changelog?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/debian/changelog (original)
+++ packages/libconfig-auto-perl/trunk/debian/changelog Sun Jul 2 14:26:46 2006
@@ -1,3 +1,11 @@
+libconfig-auto-perl (0.18-1) unstable; urgency=low
+
+ * New upstream release.
+ * Set debhelper compatibility level to 5.
+ * Set Standards-Version to 3.7.2 (no changes needed).
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Sun, 2 Jul 2006 16:23:47 +0200
+
libconfig-auto-perl (0.16-1) unstable; urgency=low
* New upstream release
Modified: packages/libconfig-auto-perl/trunk/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/debian/compat?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/debian/compat (original)
+++ packages/libconfig-auto-perl/trunk/debian/compat Sun Jul 2 14:26:46 2006
@@ -1,1 +1,1 @@
-4
+5
Modified: packages/libconfig-auto-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/debian/control?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/debian/control (original)
+++ packages/libconfig-auto-perl/trunk/debian/control Sun Jul 2 14:26:46 2006
@@ -1,11 +1,11 @@
Source: libconfig-auto-perl
Section: perl
Priority: extra
-Build-Depends: debhelper (>= 4.0.2)
+Build-Depends: debhelper (>= 5.0.0)
Build-Depends-Indep: perl (>= 5.8.0-7), libconfig-inifiles-perl, libxml-simple-perl, libtest-pod-perl (>= 1.14-1), libyaml-perl (>= 0.57-2)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Marc 'HE' Brockschmidt <he at debian.org>, Niko Tyni <ntyni at iki.fi>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
-Standards-Version: 3.6.2
+Uploaders: Marc 'HE' Brockschmidt <he at debian.org>, Niko Tyni <ntyni at iki.fi>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>, gregor herrmann <gregor+debian at comodo.priv.at>
+Standards-Version: 3.7.2
Package: libconfig-auto-perl
Architecture: all
Modified: packages/libconfig-auto-perl/trunk/lib/Config/Auto.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libconfig-auto-perl/trunk/lib/Config/Auto.pm?rev=3207&op=diff
==============================================================================
--- packages/libconfig-auto-perl/trunk/lib/Config/Auto.pm (original)
+++ packages/libconfig-auto-perl/trunk/lib/Config/Auto.pm Sun Jul 2 14:26:46 2006
@@ -10,7 +10,7 @@
use vars qw[$VERSION $DisablePerl $Untaint $Format];
-$VERSION = '0.16';
+$VERSION = '0.18';
$DisablePerl = 0;
$Untaint = 0;
@@ -27,7 +27,9 @@
yaml => \&yaml,
);
-delete $methods{'xml'}
+### make sure we give good diagnostics when XML::Simple is not available,
+### but required to parse a config
+$methods{'xml'} = sub { croak "XML::Simple not available. Can not parse '@_'" }
unless eval { require XML::Simple; XML::Simple->import; 1 };
sub parse {
@@ -39,7 +41,14 @@
croak "No config file found!" if not defined $file;
croak "Config file $file not readable!" if not -e $file;
- return if -B $file;
+
+ ### from Toru Marumoto: Config-Auto return undef if -B $file
+ ### <21d48be50604271656n153e6db6m9b059f57548aaa32 at mail.gmail.com>
+ # If a config file "$file" contains multibyte charactors like japanese,
+ # -B returns "true" in old version of perl such as 5.005_003. It seems
+ # there is no problem in perl 5.6x or older.
+ ### so check -B and only return only if
+ return if -B $file and $] >= '5.006';
my $method;
my @data;
@@ -58,6 +67,7 @@
@data = <CONFIG>;
}
my %scores = score(\@data);
+
delete $scores{perl} if exists $scores{perl} and $DisablePerl;
croak "Unparsable file format!" if !keys %scores;
# Clear winner?
@@ -85,8 +95,13 @@
for (@$data_r) {
### it's almost definately YAML if the first line matches this
- $score{yaml} += 20 if /--- #YAML:/ and $data_r->[0] eq $_;
-
+ $score{yaml} += 20 if /(?:\#|%) # a #YAML or %YAML
+ YAML
+ (?::|\s) # a YAML: or YAML[space]
+ /x and $data_r->[0] eq $_;
+ $score{yaml} += 20 if /^---/ and $data_r->[0] eq $_;
+ $score{yaml} += 10 if /^\s+-\s\w+:\s\w+/;
+
# Easy to comment out foo=bar syntax
$score{equal}++ if /^\s*#\s*\w+\s*=/;
next if /^\s*#/;
More information about the Pkg-perl-cvs-commits
mailing list