develooper Front page | perl.perl5.porters | Postings from January 2011

Time to update

Thread Next
Mark Overmeer
January 29, 2011 14:49
Time to update
Message ID:


In ancient history, memory was short and modules were small. It is the
time of autosplit. However, I would call to reconsider autosplit for

The unsplit file is 1024 lines (21kb).  It does not use function
signatures, but checks parameter list length manually...

When autosplit, POSIX fragment total to 2100 lines in 150 files (54kb).
Most of these files are 12 lines with only 1 line payload. Opening a
file is an expensive OS call, usually much more expensive than compiling
a few dozen lines of code.

In general, autosplit may hiddenly burden Perl scripts which run
in daemons like mod_perl; you do not want to load code dynamically.
The triggering of autoloading can be hard to predict and difficult
to discover.

Attached is my compact rework of the POSIX module (434 lines, 15kb), as
example how small the module actually is. No regression tests run yet.
All fancy tricks removed. But it may trigger some debate first ;-)

       Mark Overmeer MSc                                MARKOV Solutions                         

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About