perl 5.8.5
cvsmonitor 0.6.3
Array::Window 1.00
on RedHat Enterprise Linux 4.3
While searching for changesets I receive this error:
Math object failed while calculating which ChangeSets to show
In trying to fix the problem I found in the Array::Window code this
statement:
...
unless ( ref $options{source} eq 'ARRAY' ) {
return undef;
}
...
The Window object for the changeset is created from an Activity object, so
I tryed to patch cvsmonitor.pl blessing the Activity object to an ARRAY
object before passing it to the Array::Window constructor, and back to an
Activity object after the creation of the Array::Window object.
The changeset search then worked. I don't know if it's the right solution:
I don't know perl, so I submit this bug and the patch.
Alessandro Guccione
alexandros.guccione@gmail.com
cvsmonitor.pl:
@@ -2273,10 +2273,16 @@
my $window_start = $fin->{window_start} || 0;
my $window_length = $fin->{window_length} || 20;
+ # Type cast the Activity object due to restriction to arrays in package
Array::Window
+ # added by Guccione
+ bless ( $Activity, "ARRAY");
# Create a Window to do the math
my $Window = Array::Window->new( source => $Activity,
window_start => $window_start,
window_length => $window_length );
+ # Revert the type cast the Activity object due to restriction to arrays
in package Array::Window
+ # added by Guccione
+ bless ( $Activity, "CVSMonitor::MetaData::Activity");
Error( "Math object failed while calculating which ChangeSets to show" )
unless $Window;
# Create the parser
Nobody/Anonymous ( nobody ) - 2007-01-29 11:52
5
Open
None
Nobody/Anonymous
None
None
Public
|
Date: 2008-06-10 18:45 Logged In: NO |
| Filename | Description | Download |
|---|---|---|
| cvsmonitor.patch | patch for cvsmonitor.pl | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| File Added | 213580: cvsmonitor.patch | 2007-01-29 11:52 | nobody |