oklahomer / p5-Facebook-OpenGraph

https://metacpan.org/release/Facebook-OpenGraph
Other
14 stars 5 forks source link

is_api_version_eq_or_later_than bug #18

Closed chakkit closed 6 years ago

chakkit commented 6 years ago

Hi,

I did a quick test and looks like something wrong with comparison version number as below:

package Facebook::OpenGraph::Response; ... sub is_api_version_eq_or_later_than { my ($self, $comparingversion) = @; croak 'comparing version is not given.' unless $comparing_version;

(my $decimal_comparing_version = $comparing_version) =~ s/\A v //x;
(my $decimal_response_version  = $self->api_version) =~ s/\A v //x;

return ($decimal_comparing_version + 0) <= ($decimal_response_version + 0);

}

If version number is more than v2.9 i.e. v2.10 and up, it returned as NOT more than v2.3.

P.S. I tested with Strawberry Perl 5.16.

oklahomer commented 6 years ago

Thanks for reporting that, and yes that is a bug. A fix will be released in a day or two.

oklahomer commented 6 years ago

@chakkit 1.24 is released, and this bug should now be resolved. Thanks again for reporting 😄