On Wed Aug 18 13:10:54 2010, MKANAT wrote:
Show quoted text> To implement a "diffstat"-like functionality in Perl, it would be nice to
> have a specific count of the number of lines added/removed by the whole
> file and by each Change, as opposed to just the general "size" accessor.
This information is already available :
if( $cs->type eq 'ADD' ) {
$added += $cs->size;
}
elsif( $cs->type eq 'REMOVE' ) {
$removed += $cs->size;
}
elsif( $cs->type eq 'MODIFY' ) {
$added += $cs->size;
$removed += $cs->size;
}
I could sort of see a ->delta method +size for ADD, -size for REMOVE.
But it would be 0 for MODIFY.
Or are you thinking of something else?