On Thu, 2008-04-24 at 19:55 -0700, James Keenan via RT wrote:
> Please see patch attached.  It turned out that config/auto/opengl.pm
> didn't quite conform to the pattern, so I left it unchanged.

Other than having a Darwin case, how is it different than the pattern?

Also, the implementation of C<_add_to_libs> is a little wordy.  How's
this?

 sub _add_to_libs {
     my ($self, $args) = @_;
     croak "_add_to_libs() takes hashref" unless ref($args) eq 'HASH';

     my $os       = $args->{osname};
     my $cc       = $args->{cc};
     my $platform = $os =~ /mswin32/i && $cc =~ /^gcc/i ? 'win32_gcc'   :
                    $os =~ /mswin32/i                   ? 'win32_other' :
                    $os =~ /darwin/i                    ? 'darwin'      :
                                                        ? 'default'     ;

     my $libs     = $args->{$platform} || $args->{default};

     $args->{conf}->data->add(' ', libs => $libs);
     return 1;
 }

Note that I changed the name of the default platform from 'non_win32' to
'default', to better reflect its real use.


-'f


Reply via email to