Prev: javascript
Next: Sound-synched movie
From: coltrane on 2 Jul 2010 14:55 I am just learning javascript and I downloaded a js file from the jsan site. Throughout the code there are lines that start with "=". What do these lines mean. Also it seems that descriptive text is added without comment delimiters. Can this be done? this is taken from the file: =head1 DESCRIPTION This library provides tools to take a filepath and pull the directory name and filename out of it. This is much like the perl module 'File::Basename' or the unix shell tools of 'basename' and 'dirname'. This type of tool can be useful if you need to process full paths on the server in request but want to display only filenames to the user. =head2 Constructor var file = new File.Basename(path, platform); Create a new C<File.Basename> object. =over =item * path File path to process =item * platform I<optional> A 'File.Basename' platform constant, this tells the object how to process the filepath it was given. If this is not passed the object will try to guess based upon the user agent string. If this is not available then it will default to UNIX. For the platform constants see the section L<Constants> below. =back =head2 Class Properties =head3 VERSION File.Basename.VERSION Current library version =head2 Methods =head3 basename() file.basename();
From: coltrane on 2 Jul 2010 14:58 never mind, I just realized that all of these lines that start with an "=" are all withing a comment block.
From: Stefan Weiss on 2 Jul 2010 15:24 On 02/07/10 20:58, coltrane wrote: > never mind, I just realized that all of these lines that start with an > "=" are all withing a comment block. This type of documentation is known as POD (Plain Old Documentation). It's usually used to document Perl programs. I haven't seen it used in connection with JavaScript before, but if there's a suitable converter, why not. Here's a high level overview of the format, in case you're interested: http://en.wikipedia.org/wiki/Plain_Old_Documentation -- stefan
|
Pages: 1 Prev: javascript Next: Sound-synched movie |