Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37860964
en ru br
ALT Linux repos
S:0.81-alt2
5.0: 0.81-alt1
4.1: 0.79-alt1
4.0: 0.79-alt1
3.0: 0.75-alt1

Group :: Development/Perl
RPM: perl-XML-Dumper

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: perl-XML-Dumper-0.81-alt1.patch
Download


 .gear/rules                                        |    2 +
 .../tags/bfbd39d917f8f559371c1b3283dd2565fa273ec7  |   13 +++
 .gear/tags/list                                    |    1 +
 Dumper.pm                                          |   53 ++++----------
 perl-XML-Dumper.spec                               |   78 ++++++++++++++++++++
 5 files changed, 109 insertions(+), 38 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..d7e5b96
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @version@:. name=XML-Dumper-@version@
+diff: @version@:. . name=perl-XML-Dumper-@version@-@release@.patch
diff --git a/.gear/tags/bfbd39d917f8f559371c1b3283dd2565fa273ec7 b/.gear/tags/bfbd39d917f8f559371c1b3283dd2565fa273ec7
new file mode 100644
index 0000000..0fbe448
--- /dev/null
+++ b/.gear/tags/bfbd39d917f8f559371c1b3283dd2565fa273ec7
@@ -0,0 +1,13 @@
+object 2a59f570eba42e9161c8659aa891bdbcea701577
+type commit
+tag 0.81
+tagger Alexey Tourbin <at@altlinux.ru> 1218489765 +0400
+
+0.81
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEABECAAYFAkigraUACgkQfBKgtDjnu0aVUgCgtNzTDIdEY4KKA3D6gLnBqqMT
+QvUAoKb7GBjUW2TyPgsqPxG21HHnqb5j
+=/UkU
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..634a0df
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+bfbd39d917f8f559371c1b3283dd2565fa273ec7 0.81
diff --git a/Dumper.pm b/Dumper.pm
index 04cff10..9643825 100644
--- a/Dumper.pm
+++ b/Dumper.pm
@@ -150,16 +150,7 @@ our @EXPORT_OK = ( );
 our @EXPORT = qw( xml2pl pl2xml xml_compare xml_identity );
 our $VERSION = '0.81'; 
 
-our $COMPRESSION_AVAILABLE;
-
-BEGIN {
-	eval { require Compress::Zlib; };
-	if( $@ ) {
-		$COMPRESSION_AVAILABLE = 0;
-	} else {
-		$COMPRESSION_AVAILABLE = 1;
-	}
-}
+our $COMPRESSION_AVAILABLE = 1;
 
 our $dump = new XML::Dumper;
 
@@ -437,22 +428,12 @@ Usage: See Synopsis
 
 	if( defined $file ) { 
 		if( $file =~ /\.xml\.gz$/i ) {
-			if( $COMPRESSION_AVAILABLE ) {
-				my $compressed_xml = Compress::Zlib::memGzip( $xml ) or die "Failed to compress xml $!";
-				open FILE, ">:utf8", $file or die "Can't open '$file' for writing $!";
-				binmode FILE;
-				print FILE $compressed_xml;
-				close FILE;
-
-			} else {
-				my $uncompressed_file = $file;
-				$uncompressed_file =~ s/\.gz$//i;
-				warn "Compress::Zlib not installed. Saving '$file' as '$uncompressed_file'\n";
-
-				open FILE, ">:utf8", $uncompressed_file or die "Can't open '$uncompressed_file' for writing $!";
-				print FILE $xml;
-				close FILE;
-			}
+			require Compress::Zlib;
+			my $compressed_xml = Compress::Zlib::memGzip( $xml ) or die "Failed to compress xml $!";
+			open FILE, ">:utf8", $file or die "Can't open '$file' for writing $!";
+			binmode FILE;
+			print FILE $compressed_xml;
+			close FILE;
 		} else {
 			no warnings; # to shut Perl up about Wide characters for UTF8 output
 			open FILE, ">$file" or die "Can't open '$file' for writing $!";
@@ -733,19 +714,15 @@ interface doesn't have such a named method, it won't be called.
 			close FILE;
 
 			if( $first_two_bytes eq $gzip_header_signature ) {
-				if( $COMPRESSION_AVAILABLE ) {
-					my $gz = Compress::Zlib::gzopen( $file, "rb" );
-					my @xml;
-					my $buffer;
-					while( $gz->gzread( $buffer ) > 0 ) {
-						push @xml, $buffer;
-					}
-					$gz->gzclose();
-					$xml = join "", @xml;
-
-				} else {
-					die "Compress::Zlib is not installed. Cannot read gzipped file '$file'";
+				require Compress::Zlib;
+				my $gz = Compress::Zlib::gzopen( $file, "rb" );
+				my @xml;
+				my $buffer;
+				while( $gz->gzread( $buffer ) > 0 ) {
+					push @xml, $buffer;
 				}
+				$gz->gzclose();
+				$xml = join "", @xml;
 			} else {
 
 				open FILE, $file or die "Can't open file '$file' for reading $!";
diff --git a/perl-XML-Dumper.spec b/perl-XML-Dumper.spec
new file mode 100644
index 0000000..fdf0505
--- /dev/null
+++ b/perl-XML-Dumper.spec
@@ -0,0 +1,78 @@
+%define dist XML-Dumper
+Name: perl-%dist
+Version: 0.81
+Release: alt1
+
+Summary: Perl module for dumping Perl objects from/to XML
+License: GPL
+Group: Development/Perl
+
+URL: %CPAN %dist
+Source: %dist-%version.tar
+Patch: %name-%version-%release.patch
+
+BuildArch: noarch
+
+# Automatically added by buildreq on Tue Aug 12 2008
+BuildRequires: perl-Compress-Zlib perl-XML-Parser perl-devel
+
+%description
+XML::Dumper dumps Perl data to a structured XML format.
+XML::Dumper can also read XML data that was previously dumped
+by the module and convert it back to Perl.
+
+%prep
+%setup -q -n %dist-%version
+%patch -p1
+
+%build
+%perl_vendor_build
+
+%install
+%perl_vendor_install
+
+%files
+%doc	Changes README
+%dir	%perl_vendor_privlib/XML
+	%perl_vendor_privlib/XML/Dumper.pm
+
+%changelog
+* Tue Aug 12 2008 Alexey Tourbin <at@altlinux.ru> 0.81-alt1
+- 0.79 -> 0.81
+
+* Sat Sep 24 2005 Alexey Tourbin <at@altlinux.ru> 0.79-alt1
+- 0.75 -> 0.79
+
+* Wed Jun 29 2005 Alexey Tourbin <at@altlinux.ru> 0.75-alt1
+- 0.73 -> 0.75
+
+* Fri Jun 03 2005 Alexey Tourbin <at@altlinux.ru> 0.73-alt1
+- 0.71 -> 0.73
+- alt-req-zlib.patch: clarified dependency on Compress::Zlib
+- manual pages not packaged (use perldoc)
+
+* Sat Feb 19 2005 ALT QA Team Robot <qa-robot@altlinux.org> 0.71-alt1.1
+- Rebuilt with rpm-build-perl-0.5.1.
+
+* Tue Mar 16 2004 Alexey Tourbin <at@altlinux.ru> 0.71-alt1
+- 0.67 -> 0.71
+
+* Thu Sep 04 2003 Alexey Tourbin <at@altlinux.ru> 0.67-alt1
+- updated from 0.4 (20 Jun 1999) to 0.67 (19 Aug 2003)
+
+* Mon Nov 04 2002 Stanislav Ievlev <inger@altlinux.ru> 0.4-alt2
+- rebuild with new perl
+
+* Thu Aug 09 2001 Stanislav Ievlev <inger@altlinux.ru> 0.4-alt1
+- Adopted for ALT. We need it for foomatic too.
+
+* Thu Jun 21 2001 Christian Belisle <cbelisle@mandrakesoft.com> 0.4-3mdk
+- Fixed an error in changelog.
+
+* Thu Jun 21 2001 Christian Belisle <cbelisle@mandrakesoft.com> 0.4-2mdk
+- Clean up spec.
+- Fixed distribution tag.
+- Needed by eGrail.
+
+* Mon Jun 18 2001 Till Kamppeter <till@mandrakesoft.com> 0.4-1mdk
+- Newly introduced for Foomatic.
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin