Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Pre-caching large constants

by runrig (Abbot)
on Feb 08, 2002 at 22:53 UTC ( [id://144278]=note: print w/replies, xml ) Need Help??


in reply to Pre-caching large constants

Just a not too well thought out idea, but you could put the values after a _DATA_ tag so that they're there to read in the first time, e.g:
__DATA__ SQRT5|2.blahblahblah SQRT2|1.blahblahblah E|2.more blahblah
The logic to control the reading in is left up to you, anyway, others seem to have a handle on part of that, while I don't have the time at the moment. I don't really like the AutoLoader solution, it seems nifty, but then you get too many reports from people who install the module incorrectly (just copying the pm file to a directory in @INC, or using 'use lib', when you really need to do the 'perl Makefile.PL, make...etc.), and then ask "Why doesn't this work?".

And then again, a few extra 500 byte strings really shouldn't make all that big of a difference...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://144278]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-20 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found