how to write a perldoc 
Author Message
 how to write a perldoc

I am write a module for my work, and I want to use perldoc for people to
view it.  This is the problem.  I wrote a pod, and I also used pod2man
to create a man page as well, however I still can't view it.  I tried
just moving it to the path of where the other perldocs are located, but
it still didn't work.  Is there something more I need to do?  


please

thanks.
--
Peter Halliday
Online Application Developer
Whetstone Logic, Inc.       http://www.*-*-*.com/
icq#75769411           AIM screen name: hoaggelos



Sun, 22 Dec 2002 03:00:00 GMT  
 how to write a perldoc
: I am write a module for my work, and I want to use perldoc for people to
: view it.  This is the problem.  I wrote a pod, and I also used pod2man
: to create a man page as well, however I still can't view it.  I tried
: just moving it to the path of where the other perldocs are located, but
: it still didn't work.  Is there something more I need to do?  


: please

(Well I don't know how to mail this as well as post it from this reader.)

Do you get any error messages?  We need to see them.  If there are no
errors then perhaps your documentation formats to a blank document.

We need to see your file (strip it down if it's big, and check if the
smaller file still has problems).



Sun, 22 Dec 2002 03:00:00 GMT  
 how to write a perldoc

Quote:
> Do you get any error messages?  We need to see them.  If there are no
> errors then perhaps your documentation formats to a blank document.

> We need to see your file (strip it down if it's big, and check if the
> smaller file still has problems).

Well, I below is the error message I get:

'No documentation found for "WL::Password".'

and this is the document WL::Password.pod
from this document I create a file WL::Password.3 with the command
pod2man

-------------------------begining of
file---------------------------------

=pod
=head1 NAME

Password - Helps to process the username and/or password for HTML forms

=head1 SYNOPSIS

$login_verify = WL::Password->new(
                   db_type => $db_type,
                   db => $db,
                   host => $host,
                   table => $table,
                   user => $user,
                   pass => $pass,
                   location => $location
                   error_page=> $error_page
                   message => $message, );

$login_verify->validate_login($username, $password);

=head1 DESCRIPTION

This module was designed to be used to validate password information
from HTML forms.  Right now the module can only check to see if it
matches and then returns if it does.  If the password and username do
not match an error message is called.  There are some important things
to understand when you use this so please see the REQUIREMENTS section
below before implementing this module.  First we should talk about the
variables that are passed to initialize the Password object.

=over 5

=item B<db_type:> This is the database type (e.g. mysql, oracle, etc.)
This is used to pass to the DBI module.

=item B<db:> This is the name of the database itself.

=item B<host:>  This is the name of the host that the database is on
(e.g. domain.com, ip, or localhost).

=item B<table:> This is the name of the table within the database that
you need to use.

=item B<user:> This is the username that must be used to access the
database.

=item B<pass:> This is the password that must be used to access teh
database.

=item B<location:> This is the location or path of your project.  This
is used mainly to call the error page. (e.g.
/usr/local/apache/htdocs/foldername/)

=item B<error_page:> This is the name of the error page itself.  It must
be a HTML::Template page.  It is recommended, though not required, that
the extension be '.tmpl' so as to differentiate it for maintainance
purposes.

=item B<message:> This is the message that you want to send to the error
page.

After the module is intialized the only thing that you need to do is to
call the function validate_login().  THis function must take the
username, but the password is option.  There will be cases where
security will not be as much an issue, and for those times you are given
the option of just requiring a username.

=back

=head1 REQUIREMENTS

There are some important things to notice when using this module:

B<Database Issues>- The only  thing that is important to remember is
that the field that is the username must be called 'username'  and the
field that holds the password must be called 'password'.  If either of
these are wrong you will get an error, or it will not work as you
expected.

B<Error page>- Like previously mentioned the error page must be done in
HTML::Template format.

B<Error message variable>- The variable that is used in the error page
contains this tag '<TMPL_VAR NAME=ERROR>', since the variable ERROR is
used in the module.

B<What is returned>- Right now what is returned is a '1' if the username
and password matches, and a '0' if it doesn't.  So make sure that you
check for the 1 with a statement like this:

#stores result (1 or 0)
$login_results = $login_verify->validate_login($username, $password);

#check for result
if($login_results == 1){

The point is that for right now the module does not take you to a page
if you are successful.  That is for the future though.  So basically, it
is up to you to perform any action that is needing to be done.

=head1 DISCLAIMER

Because this is not perfect let the author know if you find any error,
or have any suggestions.  Thank you.

=head1 AUTHOR


=cut

---------------------------------------------end of
file-------------------------------------
--
Peter Halliday
Online Application Developer
Whetstone Logic, Inc.       http://www.whetstonelogic.com
icq#75769411           AIM screen name: hoaggelos



Sun, 22 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Tutorial question - perldoc perlxs - learning how to write XS-based code

2. perldoc -i switch/perldoc documentation

3. perldoc PERLLOCALE(1)

4. perldoc in Active Perl

5. perldoc vs man why so much slower

6. Difference between Camel & perldoc

7. redirecting perldoc ouput on Win32

8. Writing over a previously written line

9. Help using perldoc

10. Perldoc vs. module installation

11. Newbie question : How to use perldoc?

12. Image::Magick->Write() doesn't want to write

 

 
Powered by phpBB® Forum Software