develooper Front page | perl.perl5.porters | Postings from September 2013

[perl #119869] [PATCH] WinCE Makefile and make_ext.pl general and XS fixes

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
September 19, 2013 07:12
Subject:
[perl #119869] [PATCH] WinCE Makefile and make_ext.pl general and XS fixes
Message ID:
rt-3.6.HEAD-1873-1379574715-1945.119869-15-0@perl.org
On Wed Sep 18 06:20:25 2013, nicholas wrote:
> On Wed, Sep 18, 2013 at 01:34:47PM +0100, Steve Hay wrote:
> 
> > Would anyone with knowledge of cross-compilation on other platforms
> > care to comment on the make_ext.pl part?
> 
> I don't have knowledge of the cross-compilation stuff, so I can't
> comment
> on that, but I see that the patch does this:
> 
> --- a/make_ext.pl
> +++ b/make_ext.pl
> @@ -1,6 +1,9 @@
>  #!./miniperl
>  use strict;
>  use warnings;
> +BEGIN {
> +    eval 'use constant IS_CROSS => '.(defined $::Cross::platform ? 1
> : 0).';';
> +}
>  use Config;
> 
> 
> Surely those 3 lines are equivalent to just:
> 
> use constant IS_CROSS => defined $::Cross::platform ? 1 : 0;
> 
> (Tested with the attached)
> 
> Nicholas Clark


That is a mistake. Should I remove the eval form use constant and do it
as you suggested, or not use constant at all and roll my own to avoid
the overhead of "use constant" since that module hasn't been used before
in make_ext.pl, example below

BEGIN {
      eval 'sub IS_CROSS() { '.(defined $::Cross::platform ? 1 : 0).' }';

-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119869

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About