| 1 | |||
| 2 | ############################################################################### | ||
| 3 | ## ## | ||
| 4 | ## Copyright (c) 1995 - 2013 by Steffen Beyer. ## | ||
| 5 | ## All rights reserved. ## | ||
| 6 | ## ## | ||
| 7 | ## This package is free software; you can redistribute it ## | ||
| 8 | ## and/or modify it under the same terms as Perl itself. ## | ||
| 9 | ## ## | ||
| 10 | ############################################################################### | ||
| 11 | |||
| 12 | package Bit::Vector; | ||
| 13 | |||
| 14 | 23 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 23 | ▶ | use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION @CONFIG); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | 23 | require Exporter; | |
| 18 | 23 | require DynaLoader; | |
| 19 | |||
| 20 | 23 | @ISA = qw(Exporter DynaLoader); | |
| 21 | |||
| 22 | 23 | @EXPORT = qw(); | |
| 23 | |||
| 24 | 23 | @EXPORT_OK = qw(); | |
| 25 | |||
| 26 | 23 | $VERSION = '7.5'; | |
| 27 | |||
| 28 | 23 | bootstrap Bit::Vector $VERSION; | |
| 29 | |||
| 30 | sub STORABLE_freeze | ||
| 31 | 3657 | ▶ | { |
|
Subroutine
STORABLE_freeze: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 32 | 3657 | my($self, $clone) = @_; | |
| 33 | 3657 | return( Storable::nfreeze( [ $self->Size(), $self->Block_Read() ] ) ); | |
| 34 | } | ||
| 35 | |||
| 36 | sub STORABLE_thaw | ||
| 37 | 3657 | ▶ | { |
|
Subroutine
STORABLE_thaw: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 38 | 3657 | my($self, $clone, $string) = @_; | |
| 39 | 3657 | my($size,$buffer) = @{ Storable::thaw($string) }; | |
| 40 | 3657 | $self->Unfake($size); # Undocumented feature, only for use by "Storable"! | |
| 41 | 3657 | $self->Block_Store($buffer); | |
| 42 | } | ||
| 43 | |||
| 44 | #sub STORABLE_attach # Does not work properly in nested data structures (see test cases) | ||
| 45 | #{ | ||
| 46 | # my($class, $clone, $string) = @_; | ||
| 47 | # my($size,$buffer) = @{ Storable::thaw($string) }; | ||
| 48 | # my $self = Bit::Vector->new($size); | ||
| 49 | # $self->Block_Store($buffer); | ||
| 50 | # return $self; | ||
| 51 | #} | ||
| 52 | |||
| 53 | 23 | 1; | |
| 54 | |||
| 55 | __END__ | ||