/home/.cpan/build/CDB_File-1.05-0
NameSizeModeActions
blib/-0755rm
t/-0755rm
ACKNOWLEDGE9880644editdlrm
bun-x.pl12510755editdlrm
CDB_File.bs00644editdlrm
CDB_File.c407800644editdlrm
CDB_File.o2620160644editdlrm
CDB_File.pm141270644editdlrm
CDB_File.xs262990644editdlrm
Changelog62110644editdlrm
COPYRIGHT1310644editdlrm
INSTALL6450644editdlrm
Makefile393290644editdlrm
Makefile.PL15380644editdlrm
MANIFEST4280644editdlrm
MANIFEST.SKIP1380644editdlrm
META.json15940644editdlrm
META.yml9370644editdlrm
MYMETA.json14030644editdlrm
MYMETA.yml8270644editdlrm
pm_to_blib00644editdlrm
ppport.h5214110644editdlrm
typemap7070644editdlrm
Edit: /home/.cpan/build/CDB_File-1.05-0/bun-x.pl (1251B)
#! /usr/bin/perl use CDB_File; use strict; sub unnetstrings { my ($netstrings) = @_; my @result; while ( $netstrings =~ s/^([0-9]+):// ) { push @result, substr( $netstrings, 0, $1, '' ); $netstrings =~ s/^,//; } return @result; } my $chunk = 8192; sub extract { my ( $file, $t, $b ) = @_; my $head = $$b{"H$file"}; my ( $code, $type ) = $head =~ m/^([0-9]+)(.)/; if ( $type eq "/" ) { mkdir $file, 0777; } elsif ( $type eq "_" ) { my ( $total, $now, $got, $x ); open OUT, ">$file" or die "open for output: $!\n"; exists $$b{"D$code"} or die "corrupt bun file\n"; my $fh = $t->handle; sysseek $fh, $t->datapos, 0; $total = $t->datalen; while ($total) { $now = ( $total > $chunk ) ? $chunk : $total; $got = sysread $fh, $x, $now; if ( not $got ) { die "read error\n"; } $total -= $got; print OUT $x; } close OUT; } else { print STDERR "warning: skipping unknown file type\n"; } } die "usage\n" if @ARGV != 1; my ( %b, $t ); $t = tie %b, 'CDB_File', $ARGV[0] or die "tie: $!\n"; map { extract $_, $t, \%b } unnetstrings $b{""};