Codebase list libfreezethaw-perl / debian/0.45-1
* New upstream release * debian/control: + raise debhelper versioned depends to 7 + add myself to uploaders + change gregor's email address + bump Standards-Version to 3.8.0 (no changes needed) + mention module name on extended description * debian/rules: use dh7 tiny format based on dh-make-perl -R * debian/copyright: + use the new proposal format + mention debian/* copyright holders based on debian/changelog Rene Mayorga 15 years ago
10 changed file(s) with 92 addition(s) and 97 deletion(s). Raw diff Collapse all Expand all
2222 `use strict'-complient.
2323 Version 0.43:
2424 Correct save/restore of overloaded values, including repeated refs.
25 Version 0.44:
26 Optimize thaw; apparently, with 5.8.8 \G in REx is not optimized;
27 so implement along lines suggested by Bram [wizbit] (about 5x speedup
28 in some test cases).
29 Version 0.45:
30 Maxpointer decimal width was wrongly calculated on 64bit machines with
31 narrow NVs.
284284 use Exporter;
285285
286286 @ISA = qw(Exporter);
287 $VERSION = '0.43';
287 $VERSION = '0.45';
288288 @EXPORT_OK = qw(freeze thaw cmpStr cmpStrHard safeFreeze);
289289
290290 use strict;
318318 Regexp => 0,
319319 );
320320
321 # This should better be done via pos() and \G, but apparently \G is not
322 # optimized (bug in the REx optimizer???)
323 BEGIN {
324 my $pointer_size = length pack 'p', 0;
325 #my $max_dig0 = 3*$pointer_size; # 8bits take less than 3 decimals
326 # Now calculate the exact value:
327 #my $max_pointer = sprintf "%.${max_dig0}g", 0x100**$pointer_size;
328 my $max_pointer = sprintf "%.0f", 0x100**$pointer_size;
329 die "Panic" if $max_pointer =~ /\D/;
330 my $max_pointer_l = length $max_pointer;
331 warn "Max pointer_l=$max_pointer_l" if $ENV{FREEZE_THAW_WARN};
332 eval "sub max_strlen_l () {$max_pointer_l}; 1" or die;
333 }
321334
322335 sub flushCache {$lock ^= rand; undef %saved;}
323336
341354 sub freezeREx {$string .= '/' . length($_[0]) . '|' . $_[0]}
342355
343356 sub thawString { # Returns list: a string and offset of rest
344 substr($string, $_[0]) =~ /^\$(\d+)\|/
357 substr($string, $_[0], 2+max_strlen_l) =~ /^\$(\d+)\|/
345358 or confess "Wrong format of frozen string: " . substr($string, $_[0]);
346359 length($string) - $_[0] > length($1) + 1 + $1
347360 or confess "Frozen string too short: `" .
350363 }
351364
352365 sub thawNumber { # Returns list: a number and offset of rest
353 substr($string, $_[0]) =~ /^(\d+)\|/
366 substr($string, $_[0], 1+max_strlen_l) =~ /^(\d+)\|/
354367 or confess "Wrong format of frozen string: " . substr($string, $_[0]);
355368 ($1, $_[0] + length($1) + 1);
356369 }
363376 }
364377
365378 sub thawREx { # Returns list: a REx and offset of rest
366 substr($string, $_[0]) =~ m,^/(\d+)\|,
379 substr($string, $_[0], 2+max_strlen_l) =~ m,^/(\d+)\|,
367380 or confess "Wrong format of frozen REx: " . substr($string, $_[0]);
368381 length($string) - $_[0] > length($1) + 1 + $1
369382 or confess "Frozen string too short: `" .
380393 }
381394
382395 sub thawArray {
383 substr($string, $_[0]) =~ /^[\@%](\d+)\|/ # % To make it possible thaw hashes
396 substr($string, $_[0], 2+max_strlen_l) =~ /^[\@%](\d+)\|/ # % To make it possible thaw hashes
384397 or confess "Wrong format of frozen array: \n$_[0]";
385398 my $count = $1;
386399 my $off = $_[0] + 2 + length $count;
44 Makefile.PL
55 Changes
66 README
7 META.yml Module meta-data (added by MakeMaker)
0 # http://module-build.sourceforge.net/META-spec.html
1 #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
2 name: FreezeThaw
3 version: 0.45
4 version_from: FreezeThaw.pm
5 installdirs: site
6 requires:
7
8 distribution_type: module
9 generated_by: ExtUtils::MakeMaker version 6.30
33 WriteMakefile(
44 NAME => 'FreezeThaw',
55 VERSION_FROM => "FreezeThaw.pm",
6 AUTHOR => 'Ilya Zakharevich <ilyaz@cpan.org>',
67 );
0 libfreezethaw-perl (0.43-5) UNRELEASED; urgency=low
1
0 libfreezethaw-perl (0.45-1) unstable; urgency=low
1
2 [ gregor herrmann ]
23 * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
34 (source stanza).
45 * debian/control: Added: ${misc:Depends} to Depends: field.
56
6 -- gregor herrmann <gregoa@debian.org> Sun, 16 Nov 2008 20:43:09 +0100
7 [ Rene Mayorga ]
8 * New upstream release
9 * debian/control:
10 + raise debhelper versioned depends to 7
11 + add myself to uploaders
12 + change gregor's email address
13 + bump Standards-Version to 3.8.0 (no changes needed)
14 + mention module name on extended description
15 * debian/rules: use dh7 tiny format based on dh-make-perl -R
16 * debian/copyright:
17 + use the new proposal format
18 + mention debian/* copyright holders based on debian/changelog
19
20 -- Rene Mayorga <rmayorga@debian.org> Thu, 19 Feb 2009 23:30:23 -0600
721
822 libfreezethaw-perl (0.43-4) unstable; urgency=low
923
00 Source: libfreezethaw-perl
11 Section: perl
22 Priority: optional
3 Build-Depends: debhelper (>= 5.0.0)
3 Build-Depends: debhelper (>= 7)
44 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
5 Uploaders: gregor herrmann <gregor+debian@comodo.priv.at>
6 Standards-Version: 3.7.3
5 Uploaders: gregor herrmann <gregoa@debian.org>,
6 Rene Mayorga <rmayorga@debian.org>
7 Standards-Version: 3.8.0
78 Homepage: http://search.cpan.org/dist/FreezeThaw/
89 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libfreezethaw-perl/
910 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libfreezethaw-perl/
1213 Architecture: all
1314 Depends: ${misc:Depends}, ${perl:Depends}
1415 Description: converting Perl structures to strings and back
15 Converts data to/from stringified form, appropriate for
16 FreezeThaw converts data to/from stringified form, appropriate for
1617 saving-to/reading-from permanent storage.
17
0 This is the debian package for the FreezeThaw module.
1 It was created by Ivan Kohler <ivan-debian@420.am> using dh-make-perl.
0 Format-Specification:
1 http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
2 Upstream-Maintainer: Ilya Zakharevich
3 Upstream-Source: http://search.cpan.org/dist/FreezeThaw/
4 Upstream-Name: FreezeThaw
25
3 Upstream source location: http://search.cpan.org/dist/FreezeThaw/
6 Files: *
7 Copyright: © 1995 Ilya Zakharevich. All rights reserved.
8 License-Alias: Perl
9 License: Artistic | GPL-1+
410
5 Copyright (c) 1995 Ilya Zakharevich. All rights reserved.
6 This program is free software; you can redistribute it and/or
7 modify it under the same terms as Perl itself.
11 Files: debian/*
12 Copyright: © 2001-2002 Ivan Kohler <ivan-debian@420.am>
13 © 2006-2008 gregor herrmann <gregor+debian@comodo.priv.at>
14 License: Artistic | GPL-1+
815
9 You should have received a copy of the Perl license along with
10 Perl; see the file README in Perl distribution.
11
12 You should have received a copy of the GNU General Public License
13 along with Perl; see the file Copying. If not, write to the Free
14 Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15 02110-1301, USA.
16 License: Artistic
17 This program is free software; you can redistribute it and/or modify
18 it under the terms of the Artistic License, which comes with Perl.
19 On Debian GNU/Linux systems, the complete text of the Artistic License
20 can be found in `/usr/share/common-licenses/Artistic'
1621
17 You should have received a copy of the Artistic License
18 along with Perl; see the file Artistic.
19
20
21 Author of this software makes no claim whatsoever about suitability,
22 reliability, edability, editability or usability of this product. If
23 you can use it, you are in luck, if not, I should not be kept
24 responsible. Keep a handy copy of your backup tape at hand.
25
26 With this module from this moment on you are on your own ;-). Good luck.
27
28
29 Perl is distributed under your choice of the GNU General Public License or
30 the Artistic License. On Debian GNU/Linux systems, the complete text of the
31 GNU General Public License can be found in `/usr/share/common-licenses/GPL'
32 and the Artistic Licence in `/usr/share/common-licenses/Artistic'.
22 License: GPL-1+
23 This program is free software; you can redistribute it and/or modify
24 it under the terms of the GNU General Public License as published by
25 the Free Software Foundation; either version 1, or (at your option)
26 any later version.
27 On Debian GNU/Linux systems, the complete text of the GNU General
28 Public License can be found in `/usr/share/common-licenses/GPL'
00 #!/usr/bin/make -f
1 # This debian/rules file is provided as a template for normal perl
2 # packages. It was created by Marc Brockschmidt <marc@dch-faq.de> for
3 # the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
4 # be used freely wherever it is useful.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 # If set to a true value then MakeMaker's prompt function will
10 # always return the default without waiting for user input.
11 export PERL_MM_USE_DEFAULT=1
12
13 PACKAGE=$(shell dh_listpackages)
14
15 ifndef PERL
16 PERL = /usr/bin/perl
17 endif
18
19 TMP =$(CURDIR)/debian/$(PACKAGE)
201
212 build: build-stamp
223 build-stamp:
23 dh_testdir
24
25 $(PERL) Makefile.PL INSTALLDIRS=vendor
26 $(MAKE)
27 $(MAKE) test
28
4 dh build
295 touch $@
306
317 clean:
32 dh_testdir
33 dh_testroot
34
35 dh_clean build-stamp install-stamp
36 [ ! -f Makefile ] || $(MAKE) realclean
8 dh $@
379
3810 install: install-stamp
3911 install-stamp: build-stamp
40 dh_testdir
41 dh_testroot
42 dh_clean -k
43
44 $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
45 [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5
46
12 dh install
4713 touch $@
4814
4915 binary-arch:
50 # We have nothing to do here for an architecture-independent package
5116
52 binary-indep: build install
53 dh_testdir
54 dh_testroot
55 dh_installdocs
56 dh_installchangelogs Changes
57 dh_perl
58 dh_compress
59 dh_fixperms
60 dh_installdeb
61 dh_gencontrol
62 dh_md5sums
63 dh_builddeb
17 binary-indep: install
18 dh $@
6419
65 source diff:
66 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
20 binary: binary-arch binary-indep
6721
68 binary: binary-indep binary-arch
69 .PHONY: build clean binary-indep binary-arch binary install
22 .PHONY: binary binary-arch binary-indep install clean build