r35141 - in /branches/upstream/libconfig-inifiles-perl/current: Changes MANIFEST META.yml Makefile.PL lib/Config/IniFiles.pm t/23scalar-ref.t

mogaal-guest at users.alioth.debian.org mogaal-guest at users.alioth.debian.org
Sun May 10 20:37:56 UTC 2009


Author: mogaal-guest
Date: Sun May 10 20:37:51 2009
New Revision: 35141

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35141
Log:
[svn-upgrade] Integrating new upstream version, libconfig-inifiles-perl (2.49)

Added:
    branches/upstream/libconfig-inifiles-perl/current/t/23scalar-ref.t
Modified:
    branches/upstream/libconfig-inifiles-perl/current/Changes
    branches/upstream/libconfig-inifiles-perl/current/MANIFEST
    branches/upstream/libconfig-inifiles-perl/current/META.yml
    branches/upstream/libconfig-inifiles-perl/current/Makefile.PL
    branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm

Modified: branches/upstream/libconfig-inifiles-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/Changes?rev=35141&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/Changes (original)
+++ branches/upstream/libconfig-inifiles-perl/current/Changes Sun May 10 20:37:51 2009
@@ -1,3 +1,13 @@
+Version 2.49:   ( Sat May  2 17:16:28 IDT 2009 )
+------------------------------------------------
+
+* Fixed bug https://rt.cpan.org/Public/Bug/Display.html?id=45209 :
+- Makefile.PL lacked the empty "PL_FILES" directive.
+
+* Fixed bug https://rt.cpan.org/Ticket/Display.html?id=45588 :
+- Failure to read ini file contents from a scalar (via "IO::Scalar").
+- added t/23scalar-ref.t
+
 Version 2.48:   ( Tue Apr  7 15:24:55 IDT 2009 )
 ------------------------------------------------
 

Modified: branches/upstream/libconfig-inifiles-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/MANIFEST?rev=35141&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/MANIFEST (original)
+++ branches/upstream/libconfig-inifiles-perl/current/MANIFEST Sun May 10 20:37:51 2009
@@ -29,6 +29,7 @@
 t/19param-found-outside-section.t
 t/20allowedcommentchars.t
 t/22trailing-comment-lines.t
+t/23scalar-ref.t
 t/allowed-comment-chars.ini
 t/array.ini
 t/bad.ini

Modified: branches/upstream/libconfig-inifiles-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/META.yml?rev=35141&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/META.yml (original)
+++ branches/upstream/libconfig-inifiles-perl/current/META.yml Sun May 10 20:37:51 2009
@@ -1,6 +1,6 @@
 ---
 name: Config-IniFiles
-version: 2.48
+version: 2.49
 author: []
 abstract: A module for reading .ini-style configuration files.
 license: perl
@@ -17,7 +17,7 @@
 provides:
   Config::IniFiles:
     file: lib/Config/IniFiles.pm
-    version: 2.48
+    version: 2.49
 generated_by: Module::Build version 0.32
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: branches/upstream/libconfig-inifiles-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/Makefile.PL?rev=35141&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/Makefile.PL (original)
+++ branches/upstream/libconfig-inifiles-perl/current/Makefile.PL Sun May 10 20:37:51 2009
@@ -4,4 +4,7 @@
 WriteMakefile(
     'NAME'	=> 'Config::IniFiles',
     'VERSION_FROM' => 'lib/Config/IniFiles.pm', # finds $VERSION
+    'PL_FILES' =>
+    {
+    },
 );

Modified: branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm?rev=35141&op=diff
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm (original)
+++ branches/upstream/libconfig-inifiles-perl/current/lib/Config/IniFiles.pm Sun May 10 20:37:51 2009
@@ -2,7 +2,7 @@
 
 use vars qw($VERSION);
 
-$VERSION = "2.48";
+$VERSION = "2.49";
 
 require 5.004;
 use strict;
@@ -742,8 +742,11 @@
   }
   
   # Get mod time of file so we can retain it (if not from STDIN)
-  my @stats = stat $fh;
-  $self->{file_mode} = sprintf("%04o", $stats[2]) if defined $stats[2];
+  if (ref($fh) ne "IO::Scalar")
+  {
+    my @stats = stat $fh;
+    $self->{file_mode} = sprintf("%04o", $stats[2]) if defined $stats[2];
+  }
   
   
   # The first lines of the file must be blank, comments or start with [
@@ -2040,7 +2043,7 @@
   my $thing = shift;
 
   if (ref($thing) eq "SCALAR") {
-	  if (eval { require IO::Scalar; $IO::Stringy::VERSION >= 2.109; }) {
+	  if (eval { require IO::Scalar; $IO::Scalar::VERSION >= 2.109; }) {
 		  return new IO::Scalar($thing);
 	  } else {
 		  warn "SCALAR reference as file descriptor requires IO::stringy ".

Added: branches/upstream/libconfig-inifiles-perl/current/t/23scalar-ref.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-inifiles-perl/current/t/23scalar-ref.t?rev=35141&op=file
==============================================================================
--- branches/upstream/libconfig-inifiles-perl/current/t/23scalar-ref.t (added)
+++ branches/upstream/libconfig-inifiles-perl/current/t/23scalar-ref.t Sun May 10 20:37:51 2009
@@ -1,0 +1,42 @@
+#!/usr/bin/perl
+
+# This script is a regression test for:
+#
+# https://rt.cpan.org/Ticket/Display.html?id=45588
+#
+# Failure to read the ini file contents from a scalar
+
+use Test::More;
+
+use strict;
+use warnings;
+
+use Config::IniFiles;
+
+if ( ! eval { require IO::Scalar; } )
+{
+    plan skip_all => "IO::Scalar is not available";
+}
+else
+{
+    plan tests => 2;
+}
+
+{
+    my $contents = <<'EOF';
+[section1]
+key = val
+EOF
+
+    my $conf = Config::IniFiles->new( -file => \$contents);
+
+    # TEST
+    ok ($conf, "Object was initialised from reference to scalar.");
+
+    # TEST
+    is ($conf->val("section1", "key"), 
+        "val",
+        "Object works."
+    );
+}
+




More information about the Pkg-perl-cvs-commits mailing list