| 1 | # | ||||||||||
| 2 | # Copyright (c) 2002 Paul Winkeler. All Rights Reserved. | ||||||||||
| 3 | # This program is free software; you may redistribute it and/or modify it under | ||||||||||
| 4 | # the same terms as Perl itself. | ||||||||||
| 5 | # | ||||||||||
| 6 | package NBU::Fragment; | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | ▶ | use Exporter (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | ▶ | use AutoLoader qw(AUTOLOAD); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 1 | ▶ | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 1 | $VERSION = do { my @r=(q$Revision: 1.11 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; | |||||||||
| 16 | 1 | @ISA = qw(); | |||||||||
| 17 | 1 | @EXPORT = qw(); | |||||||||
| 18 | 1 | @EXPORT_OK = qw(); | |||||||||
| 19 | 1 | %EXPORT_TAGS = qw(); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 23 | 0 | my $Class = shift; | |||||||||
| 24 | 0 | my $fragment = { }; | |||||||||
| 25 | |||||||||||
| 26 | 0 | bless $fragment, $Class; | |||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | if (@_) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | $fragment->{NUMBER} = shift; | |||||||||
| 30 | 0 | $fragment->{COPY} = shift; | |||||||||
| 31 | 0 | $fragment->{IMAGE} = shift; | |||||||||
| 32 | 0 | $fragment->{VOLUME} = shift; | |||||||||
| 33 | 0 | $fragment->{OFFSET} = shift; | |||||||||
| 34 | 0 | $fragment->{SIZE} = shift; | |||||||||
| 35 | 0 | $fragment->{DWO} = shift; | |||||||||
| 36 | 0 | $fragment->{FILENUMBER} = shift; | |||||||||
| 37 | 0 | $fragment->{BLOCKSIZE} = shift; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 0 | return $fragment; | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 0 | ▶ | sub number { | ||||||||
|
Subroutine
number: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 44 | 0 | my $self = shift; | |||||||||
| 45 | |||||||||||
| 46 | 0 | return $self->{NUMBER}; | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | sub copy { | ||||||||
|
Subroutine
copy: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 50 | 0 | my $self = shift; | |||||||||
| 51 | |||||||||||
| 52 | 0 | return $self->{COPY}; | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | # | ||||||||||
| 56 | # Volume offset data is stored in blocks but reported back in KBytes | ||||||||||
| 57 | 0 | ▶ | sub offset { | ||||||||
|
Subroutine
offset: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 58 | 0 | my $self = shift; | |||||||||
| 59 | |||||||||||
| 60 | 0 | return (($self->{OFFSET} * $self->{BLOCKSIZE})/1024); | |||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | 0 | ▶ | sub size { | ||||||||
|
Subroutine
size: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 64 | 0 | my $self = shift; | |||||||||
| 65 | |||||||||||
| 66 | 0 | return $self->{SIZE}; | |||||||||
| 67 | } | ||||||||||
| 68 | |||||||||||
| 69 | 0 | ▶ | sub volume { | ||||||||
|
Subroutine
volume: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 70 | 0 | my $self = shift; | |||||||||
| 71 | |||||||||||
| 72 | 0 | return $self->{VOLUME}; | |||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | 0 | ▶ | sub fileNumber { | ||||||||
|
Subroutine
fileNumber: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 76 | 0 | my $self = shift; | |||||||||
| 77 | |||||||||||
| 78 | 0 | return $self->{FILENUMBER}; | |||||||||
| 79 | } | ||||||||||
| 80 | |||||||||||
| 81 | 0 | ▶ | sub driveWrittenOn { | ||||||||
|
Subroutine
driveWrittenOn: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 82 | 0 | my $self = shift; | |||||||||
| 83 | |||||||||||
| 84 | 0 | return $self->{DWO}; | |||||||||
| 85 | } | ||||||||||
| 86 | |||||||||||
| 87 | 0 | ▶ | sub blockSize { | ||||||||
|
Subroutine
blockSize: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 88 | 0 | my $self = shift; | |||||||||
| 89 | |||||||||||
| 90 | 0 | return $self->{BLOCKSIZE}; | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | 0 | ▶ | sub image { | ||||||||
|
Subroutine
image: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 94 | 0 | my $self = shift; | |||||||||
| 95 | |||||||||||
| 96 | 0 | return $self->{IMAGE}; | |||||||||
| 97 | } | ||||||||||
| 98 | |||||||||||
| 99 | 1 | 1; | |||||||||
| 100 | |||||||||||
| 101 | __END__ | ||||||||||