Re: UFO (Unidentified Formatting Observation) on the web....
On Fri, 2002-02-01 at 10:44, Ron Goral wrote: > I have a very beginner's question. I've just been looking at the code for a > library file and noticed some, to me, very peculiar things. First, there is > text that is not commented, it is just typed in place. Why does this not > interfere with the script? Second, there are expressions like "=pod" and > "=cut" and "=head1". What do these mean? Third, there is a "1;" at the > very end of the file. I've seen that before, but what is the purpose? > Fourth, there is text like "I blah blah" and "B" (I > assume that this last is a comment on text decoration). Can anyone tell me > what these mean? Is there a difference in a library file and a regular > script file that allows for this? Is there some tutorial or documentation > about the differences in writing a library/module versus a normal script > file? > That is POD (Plain Old Documentation). POD is a method of documenting Perl code be it a script or a library. See "perldoc perlpod" for more information. The 1; at the end of the file is necessary for libraries only. See "perldoc perlmod" for more information. -- Today is Boomtime the 32nd day of Chaos in the YOLD 3168 All Hail Discordia! Missle Address: 33:48:3.521N 84:23:34.786W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UFO (Unidentified Formatting Observation) on the web....
it's pod, do 'perldoc module' and 'perldoc perldoc' /jon Ron Goral wrote: > > I have a very beginner's question. I've just been looking at the code for a > library file and noticed some, to me, very peculiar things. First, there is > text that is not commented, it is just typed in place. Why does this not > interfere with the script? Second, there are expressions like "=pod" and > "=cut" and "=head1". What do these mean? Third, there is a "1;" at the > very end of the file. I've seen that before, but what is the purpose? > Fourth, there is text like "I blah blah" and "B" (I > assume that this last is a comment on text decoration). Can anyone tell me > what these mean? Is there a difference in a library file and a regular > script file that allows for this? Is there some tutorial or documentation > about the differences in writing a library/module versus a normal script > file? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UFO (Unidentified Formatting Observation) on the web....
On Feb 1, Ron Goral said: >I have a very beginner's question. I've just been looking at the code for a >library file and noticed some, to me, very peculiar things. First, there is >text that is not commented, it is just typed in place. Why does this not >interfere with the script? Second, there are expressions like "=pod" and >"=cut" and "=head1". What do these mean? Third, there is a "1;" at the >very end of the file. I've seen that before, but what is the purpose? >Fourth, there is text like "I blah blah" and "B" (I >assume that this last is a comment on text decoration). Can anyone tell me >what these mean? Is there a difference in a library file and a regular >script file that allows for this? Is there some tutorial or documentation >about the differences in writing a library/module versus a normal script >file? The text that "is not commented", you will find, is placed inbetween the =XYZ statements. The =XYZ statements are called Pod directives, and the I<...> and B<...> statements are Pod markup. Pod is "Plain Old Documentation", a very simple markup language for documenting Perl programs. Read 'perldoc perlpod' for information on Pod. The '1;' at the end of the file is there so that the file returns a true value when Perl require()s it. See 'perldoc -f require'. As for how a library or module differs from a "normal" program, it's basically how an encyclopedia differs from your term paper. You READ your term paper, and it makes references to places in the encyclopedia -- you wouldn't use the entire encyclopedia as your term paper. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** what does y/// stand for? why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UFO (Unidentified Formatting Observation) on the web....
I have a very beginner's question. I've just been looking at the code for a library file and noticed some, to me, very peculiar things. First, there is text that is not commented, it is just typed in place. Why does this not interfere with the script? Second, there are expressions like "=pod" and "=cut" and "=head1". What do these mean? Third, there is a "1;" at the very end of the file. I've seen that before, but what is the purpose? Fourth, there is text like "I blah blah" and "B" (I assume that this last is a comment on text decoration). Can anyone tell me what these mean? Is there a difference in a library file and a regular script file that allows for this? Is there some tutorial or documentation about the differences in writing a library/module versus a normal script file? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]