Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DocSet::DocSet(3)     User Contributed Perl Documentation    DocSet::DocSet(3)

NAME
       "DocSet::DocSet"	- An abstract docset generation	class

SYNOPSIS
	 use DocSet::DocSet::HTML ();
	 my $docset = DocSet::DocSet::HTML->new($config_file);

	 # must	start from the abs root
	 chdir $abs_root;

	 # must	be a relative path to be able to move the generated code from
	 # location to location, without adjusting the links
	 $docset->set_dir(abs_root => ".");
	 $docset->scan;
	 $docset->render;

	 my $should_update = $self->should_update($src_path, $dst_path);

DESCRIPTION
       "DocSet::DocSet"	processes a docset, which can include other docsets,
       documents and links. In the first pass it scans the linked to it
       documents and other docsets and caches this information and the objects
       for a later peruse. In the second pass the stored objects are rendered.
       And the docset is completed.

       This class cannot be used on its	own and	has to be subclassed and
       extended, by the	sub-classes which has a	specific to input and output
       formats of the documents	that need to be	processed. It handles only the
       partial functionality which doesn't require format specific knowledge.

   METHODS
       This class inherits from	"DocSet::Config" and you will find the
       documentation of	methods	inherited from this class in its pod.

       The following "public" methods are implemented in this super-class:

       o   new

	     $class->new($config_file, $parent_o, $src_rel_dir);

       o   init

	     $self->init($config_file, $parent_o, $src_rel_dir);

       o   scan

	     $self->scan();

	   Scans the docset for	meta data and tocs of its items	and caches
	   this	information and	the item objects.

       o   scan_copy_the_rest

	     $self->scan_copy_the_rest()

	   Process the files that should be copied as is without processing
	   (i.e. images, css files, etc). If any of the	items have a timestamp
	   newer than the corresponding	copy in	the target destination,	the
	   whole docset	will be	rebuilt.

	   Only	files that were	modified will be copied	during the render
	   phase.

       o   render

	     $self->render();

	   Calls the render() method of	each of	the stored objects and creates
	   an index page linking all the items.

       o   copy_the_rest

	     $self->copy_the_rest()

	   Copies the files which aren't processed (i.e. images, css files,
	   etc.)  and were modified as-is.

       o   should_update

	     my	$should_update = $self->should_update($src_path, $dst_path);

	   Compare the timestamps/existance of src and dst paths and return
	   (true, reason) if src is newer than dst otherwise return (false,
	   reason)

	   If rebuild_all runtime is on, this always returns (true, reason)

   ABSTRACT METHODS
       The following methods should be implemented by the sub-classes.

       o   parse

       o   retrieve_meta_data

       o   convert

       o   complete

	     $self->complete();

	   put here anything that should be run	after all the items have been
	   rendered and	all the	meta info has been collected. i.e. generation
	   of the index	file, to link to all the links and the parent node if
	   such	exists.

AUTHORS
       Stas Bekman <stas (at) stason.org>

perl v5.32.1			  2005-09-02		     DocSet::DocSet(3)

NAME | SYNOPSIS | DESCRIPTION | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DocSet::DocSet&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help