[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Easier building of Perl



Andy Dougherty <doughera@lafayette.edu> writes:

[Sorry for the big quote:]
> First, it's not obvious that it buys as much as you might first imagine.
> Let me give a specific example.  Here's the section from Configure where
> we try to determine what typedef to use for lseek():
> 
>     : see what type lseek is declared as in the kernel
>     rp="What is the type used for lseek's offset on this system?"
>     set off_t lseektype long stdio.h sys/types.h
>     eval $typedef_ask
> 
> Translating that into perl might look something vaguely like this 
> (assuming some useful functions have been defined previously)
> 
>     # see what type lseek is declared as in the kernel
>     $lseektype = typdef_ask($lseektype,
> 	prompt => "What is the type used for lseek's offset on this system?",
> 	alts => [qw(off_t long)],
> 	includes => [qw(stdio sys/types.h)]);
> 
> More readable, yes, but so dramatically so that it's worth the huge
> investment to rewrite?  A difficult question.

As I see it, the major advantage is not readability/maintainability,
but the fact that in the case there's an existsing installation, most
of these things do not need to be dynamically determined. 

But I do realise that it is an awful amount of work...

-- Johan


References to:
Andy Dougherty <doughera@lafayette.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]