[Bioperl-l] Having working code in documentation
Heikki Lehvaslaiho
heikki@ebi.ac.uk
Thu, 12 Apr 2001 09:03:33 +0100
Kris Boulez wrote:
>
> As suggeted in
> http://bio.perl.org/wiki/html/BioPerl/BioperlProgrammingConventions.html
> I'm making the SYNOPSIS part of every module to be runnable code. As the
> t directory of the distribution contains files in all different formats,
> I find myself writing code like the following
>
> $inputfilename = "/path/to/bioperl-0.7.0/t/testaln.fasta";
>
> What are the possibilities to get this to work when people view
> (man/perldoc) the manual pages:
In my opinion you are overdoing it.
# set to a valid fasta file
$inputfilename = "myfile.fasta";
... should be enough leaving it to the user to get a fata file.
... or an other possibility if you want to use the
test file would be:
$inputfilename = "$BIOPERLROOT/t/testaln.fasta";
It would be a useful addition conventions if we could decide on this
and, for example, a consistent way of naming variables in a consistent
way. Suggestions?
-Heikki
> - do the translation at the 'make' stage (I'm not a make/MakeMaker
> specialist, so I gave no idea)
> - have the people create the symlink from /path/to :)
>
> P.S. As an aside: do we want this synopsis code to be '-w' and 'use
> strict' clean ?
-w would be nice but 'strict clean' is too much. Synopsis should be
as clean code as possible.
-Heikki
> Kris,
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki@ebi.ac.uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________