in reply to require vs eval
I'm not very familiar with the internals of perl, but logic suggests that require is essentially eval where the data to be eval'd comes from a file. Therefore, the evaluation (parsing, compiling etc) of the text will take the same amount of time either way.
The difference will be the overhead in writing the text to a file only to read it back in.
There's more to it than that, but all of that "more to it" is additional overhead on the require, making the eval look even better.
That said, I'd like to see the code you are evaling. 5 gets you 2 that there is a better way:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: require vs eval
by antirice (Priest) on Jun 16, 2003 at 21:52 UTC |