* 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
22 | 22 | `use strict'-complient. |
23 | 23 | Version 0.43: |
24 | 24 | 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. |
284 | 284 | use Exporter; |
285 | 285 | |
286 | 286 | @ISA = qw(Exporter); |
287 | $VERSION = '0.43'; | |
287 | $VERSION = '0.45'; | |
288 | 288 | @EXPORT_OK = qw(freeze thaw cmpStr cmpStrHard safeFreeze); |
289 | 289 | |
290 | 290 | use strict; |
318 | 318 | Regexp => 0, |
319 | 319 | ); |
320 | 320 | |
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 | } | |
321 | 334 | |
322 | 335 | sub flushCache {$lock ^= rand; undef %saved;} |
323 | 336 | |
341 | 354 | sub freezeREx {$string .= '/' . length($_[0]) . '|' . $_[0]} |
342 | 355 | |
343 | 356 | sub thawString { # Returns list: a string and offset of rest |
344 | substr($string, $_[0]) =~ /^\$(\d+)\|/ | |
357 | substr($string, $_[0], 2+max_strlen_l) =~ /^\$(\d+)\|/ | |
345 | 358 | or confess "Wrong format of frozen string: " . substr($string, $_[0]); |
346 | 359 | length($string) - $_[0] > length($1) + 1 + $1 |
347 | 360 | or confess "Frozen string too short: `" . |
350 | 363 | } |
351 | 364 | |
352 | 365 | sub thawNumber { # Returns list: a number and offset of rest |
353 | substr($string, $_[0]) =~ /^(\d+)\|/ | |
366 | substr($string, $_[0], 1+max_strlen_l) =~ /^(\d+)\|/ | |
354 | 367 | or confess "Wrong format of frozen string: " . substr($string, $_[0]); |
355 | 368 | ($1, $_[0] + length($1) + 1); |
356 | 369 | } |
363 | 376 | } |
364 | 377 | |
365 | 378 | 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+)\|, | |
367 | 380 | or confess "Wrong format of frozen REx: " . substr($string, $_[0]); |
368 | 381 | length($string) - $_[0] > length($1) + 1 + $1 |
369 | 382 | or confess "Frozen string too short: `" . |
380 | 393 | } |
381 | 394 | |
382 | 395 | 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 | |
384 | 397 | or confess "Wrong format of frozen array: \n$_[0]"; |
385 | 398 | my $count = $1; |
386 | 399 | my $off = $_[0] + 2 + length $count; |
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 |
3 | 3 | WriteMakefile( |
4 | 4 | NAME => 'FreezeThaw', |
5 | 5 | VERSION_FROM => "FreezeThaw.pm", |
6 | AUTHOR => 'Ilya Zakharevich <ilyaz@cpan.org>', | |
6 | 7 | ); |
0 | libfreezethaw-perl (0.43-5) UNRELEASED; urgency=low | |
1 | ||
0 | libfreezethaw-perl (0.45-1) unstable; urgency=low | |
1 | ||
2 | [ gregor herrmann ] | |
2 | 3 | * debian/control: Changed: Switched Vcs-Browser field to ViewSVN |
3 | 4 | (source stanza). |
4 | 5 | * debian/control: Added: ${misc:Depends} to Depends: field. |
5 | 6 | |
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 | |
7 | 21 | |
8 | 22 | libfreezethaw-perl (0.43-4) unstable; urgency=low |
9 | 23 |
0 | 0 | Source: libfreezethaw-perl |
1 | 1 | Section: perl |
2 | 2 | Priority: optional |
3 | Build-Depends: debhelper (>= 5.0.0) | |
3 | Build-Depends: debhelper (>= 7) | |
4 | 4 | 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 | |
7 | 8 | Homepage: http://search.cpan.org/dist/FreezeThaw/ |
8 | 9 | Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libfreezethaw-perl/ |
9 | 10 | Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libfreezethaw-perl/ |
12 | 13 | Architecture: all |
13 | 14 | Depends: ${misc:Depends}, ${perl:Depends} |
14 | 15 | 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 | |
16 | 17 | 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 | |
2 | 5 | |
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+ | |
4 | 10 | |
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+ | |
8 | 15 | |
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' | |
16 | 21 | |
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' |
0 | 0 | #!/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) | |
20 | 1 | |
21 | 2 | build: build-stamp |
22 | 3 | build-stamp: |
23 | dh_testdir | |
24 | ||
25 | $(PERL) Makefile.PL INSTALLDIRS=vendor | |
26 | $(MAKE) | |
27 | $(MAKE) test | |
28 | ||
4 | dh build | |
29 | 5 | touch $@ |
30 | 6 | |
31 | 7 | clean: |
32 | dh_testdir | |
33 | dh_testroot | |
34 | ||
35 | dh_clean build-stamp install-stamp | |
36 | [ ! -f Makefile ] || $(MAKE) realclean | |
8 | dh $@ | |
37 | 9 | |
38 | 10 | install: install-stamp |
39 | 11 | 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 | |
47 | 13 | touch $@ |
48 | 14 | |
49 | 15 | binary-arch: |
50 | # We have nothing to do here for an architecture-independent package | |
51 | 16 | |
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 $@ | |
64 | 19 | |
65 | source diff: | |
66 | @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false | |
20 | binary: binary-arch binary-indep | |
67 | 21 | |
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 |