[Padre-dev] Padre, Alien::wxWidgets and wxWidgets 2.8.10
Gabor Szabo
szabgab at gmail.com
Sat Mar 21 23:35:46 PDT 2009
On Sat, Mar 21, 2009 at 9:53 PM, Cezary Morga <cm at therek.net> wrote:
> Hi there.
>
> I've noticed that with wxWidgets 2.8.10 the trailing zero is removed
> from Alien::wxWidgets->version. I've written to wxPerl mailing list
> (http://www.nntp.perl.org/group/perl.wxperl.users/2009/03/msg6422.html)
> about it, but even though Alien::wxWidgets->version returns the correct
> version number now Padre says during configuration that it found 2.8.1
> which might be misleading.
>
> I've came up with some as ugly as this. What do you make of it?
>
> --- inc/Module/Install/PRIVATE/Padre.pm.orig 2009-03-21
> 20:36:42.000000000 +0100
> +++ inc/Module/Install/PRIVATE/Padre.pm 2009-03-21 20:50:20.000000000
> +0100
> @@ -59,9 +59,10 @@
> unless ( $widgets ) {
> nono("Alien::wxWidgets was unable to determine the
> wxWidgets version");
> }
> - my $widgets_human = $widgets;
> - $widgets_human =~ s/^(\d\.\d\d\d)(\d\d\d)$/$1.$2/;
> - $widgets_human =~ s/0//g;
> + my ($widgets_human, $w2, $w3) = $widgets =~ /(\d)\.(\d\d\d)
> (\d\d\d)/;
> + $w2 =~ s/^0+//;
> + $w3 =~ s/^0+//;
> + $widgets_human .= ".$w2.$w3";
> print "Found wxWidgets $widgets_human\n";
> unless ( $widgets >= 2.008008 ) {
> nono("Padre needs at least version 2.8.8 of wxWidgets.
> You have wxWidgets $widgets_human");
I am not sure why removing the leading 0s would help here?
Gabor
More information about the Padre-dev
mailing list