Skip Menu |

This queue is for tickets about the SVN-Dump CPAN distribution.

Report information
The Basics
Id: 130903
Status: resolved
Priority: 0/
Queue: SVN-Dump

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: 0.07



Subject: bug in example in Description
Howdy, The example in the DESCRIPTION section of the docs has a couple of problems. Here's the code 1: use SVN::Dump; 2: 3: my $dump = SVN::Dump->new( 'mydump.svn' ); 4: print $dump->as_string(); # only print the dump header 5: 6: while( $rec = $dump->next_record() ) { 7: print $rec->as_string(); 8: } 1. in line 3, The argument to the constructor should be a hash: my $dump = SVN::Dump->new( {file => 'mydump.svn' } ); 2. Line 4 results in Can't call method "as_string" on an undefined value at [...]/SVN/Dump.pm line 73. because nothing has been read from the dump file. It looks like next_record() needs to be called first. Here's the start of my dump file: SVN-fs-dump-format-version: 2 UUID: 25fd25a6-c234-44fc-9872-c99ed41caf87 This corresponds to two records returned by SVN::Dump::Reader, so to get the example code to work, it needs to look like this: $dump->next_record; $dump->next_record; print $dump->as_string(); which seems a bit magical if you don't know the SVN format. Thanks! Diab
Subject: Re: [rt.cpan.org #130903] Resolved: bug in example in Description
Date: Fri, 31 Jan 2020 09:35:01 -0500
To: bug-SVN-Dump [...] rt.cpan.org
From: Diab Jerius <djerius [...] cpan.org>
Thanks! On Fri, Jan 31, 2020 at 1:34 AM Philippe Bruhat (BooK) via RT < bug-SVN-Dump@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=130903 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >