|
Posted by pgodfrin on March 26, 2008, 8:00 pm
Please log in for more thread options On Mar 26, 5:37 pm, xhos...@gmail.com wrote:
> > > pgodfrin wrote:
> > > > Anyone know of a good article that discusses when and why you would
> > > > use the BEGIN, UNITCHECK, CHECK, INIT and END code blocks?
>
> > > perldoc perlmod
>
> > been there done that. Can we do better?
>
> What parts do you think need improving?
>
> After reading my installed perlmod, I know what BEGIN and END do, and I
> know that if I want to do what they do, then I should use the one that does
> what I want done. I don't know what more to ask of documentation than
> that. For CHECK and INIT, I know that they are used for things I will
> probably rarely if ever need to do, but they are in the back of mind,
> reminding me to re-read the docs if I ever do decide I might need them.
> Again, It isn't clear to me what more is needed.
>
> After reading the 5.10 perlmod, I see that UNITCHECK should be used if
> I need something like CHECK but which is run in string evals (and some
> other special constructs) unlike CHECK. Maybe it should point out that
> UNITCHECK is newer and perhaps existing CHECK and INIT code would be better
> done in the newer style as UNITCHECK code.
>
> Xho
>
> --
> --------------------http://NewsReader.Com/--------------------
> The costs of publication of this article were defrayed in part by the
> payment of page charges. This article must therefore be hereby marked
> advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
> this fact.
Hi Xho,
Sorry - didn't mean to impugn the quality of the docs. All I was
looking for is some sort of article from a trade rag, for instance,
that discussed the utility of those code blocks. You know, maybe some
sort of article where a really good Perl programmer describes how he
(or she :) ) uses those code blocks in an effective manner.
That's all.
smiles,
pg
|