perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r267279 - in /perl/modperl/docs/trunk/lib/DocSet: ./ Doc/ DocSet/ Source/
Date Fri, 02 Sep 2005 19:24:12 GMT
Author: stas
Date: Fri Sep  2 12:23:57 2005
New Revision: 267279

URL: http://svn.apache.org/viewcvs?rev=267279&view=rev
Log:
sync with DocSet 0.18:
- a few style fixes [Philip M. Gollucci <pgollucci@p6m7g8.com>]

- fix DocSet::Doc::POD2HTML::View::HTMLPS not to anchor =headX titles,
  since when rendering ps/pdf, some interpreters fail to render a
  proper link, leaving some ugly misplaced link frame. That link was
  pointing nowhere anyway, so it's a good thing it is gone.

- synced with html2ps changes html2ps-1.0b4 which was surprisingly
  updated 5 years later.


Modified:
    perl/modperl/docs/trunk/lib/DocSet/5005compat.pm
    perl/modperl/docs/trunk/lib/DocSet/Cache.pm
    perl/modperl/docs/trunk/lib/DocSet/Config.pm
    perl/modperl/docs/trunk/lib/DocSet/Doc.pm
    perl/modperl/docs/trunk/lib/DocSet/Doc/Common.pm
    perl/modperl/docs/trunk/lib/DocSet/Doc/HTML2HTML.pm
    perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTML.pm
    perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTMLPS.pm
    perl/modperl/docs/trunk/lib/DocSet/DocSet.pm
    perl/modperl/docs/trunk/lib/DocSet/DocSet/HTML.pm
    perl/modperl/docs/trunk/lib/DocSet/DocSet/PSPDF.pm
    perl/modperl/docs/trunk/lib/DocSet/NavigateCache.pm
    perl/modperl/docs/trunk/lib/DocSet/RunTime.pm
    perl/modperl/docs/trunk/lib/DocSet/Source/HTML.pm
    perl/modperl/docs/trunk/lib/DocSet/Source/POD.pm
    perl/modperl/docs/trunk/lib/DocSet/Util.pm

Modified: perl/modperl/docs/trunk/lib/DocSet/5005compat.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/5005compat.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/5005compat.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/5005compat.pm Fri Sep  2 12:23:57 2005
@@ -26,7 +26,7 @@
         die "you need to install File-Spec-$min_version or higher from CPAN";
     }
 
-    while (my($file, $sub) = each %compat_files) {
+    while (my ($file, $sub) = each %compat_files) {
         $sub->($file);
     }
 }

Modified: perl/modperl/docs/trunk/lib/DocSet/Cache.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Cache.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Cache.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Cache.pm Fri Sep  2 12:23:57 2005
@@ -13,7 +13,7 @@
 # $update == 1 marks the cache as dirty, so it'll be always written to the disk
 # $purge == 1 deletes the existing cache file if such exists
 sub new {
-    my($class, $path, $update, $purge) = @_;
+    my ($class, $path, $update, $purge) = @_;
 
     die "no cache path specified" unless defined $path;
 
@@ -49,7 +49,7 @@
 }
 
 sub path {
-    my($self) = @_;
+    my ($self) = @_;
     $self->{path};
 }
 
@@ -72,7 +72,7 @@
 }
 
 sub read {
-    my($self) = @_;
+    my ($self) = @_;
 
     if (-w $self->{path} && DocSet::RunTime::has_storable_module()) {
         note "+++ Reading cache from $self->{path}";
@@ -91,7 +91,7 @@
 }
 
 sub write {
-    my($self) = @_;
+    my ($self) = @_;
 
     if (DocSet::RunTime::has_storable_module()) {
         note "+++ Storing the docset's cache to $self->{path}";
@@ -101,14 +101,14 @@
 }
 
 sub add {
-    my($self, $id) = @_;
+    my ($self, $id) = @_;
     push @{ $self->{cache}{_ordered_ids} }, $id;
     $self->{cache}{$id}{seq} = $#{ $self->{cache}{_ordered_ids} };
 }
 
 # set a cache entry (overrides a prev entry if any exists)
 sub set {
-    my($self, $id, $attr, $data, $hidden) = @_;
+    my ($self, $id, $attr, $data, $hidden) = @_;
 
     croak "must specify a unique id"  unless defined $id;
     croak "must specify an attribute" unless defined $attr;
@@ -127,7 +127,7 @@
 
 # get a cache entry
 sub get {
-    my($self, $id, $attr) = @_;
+    my ($self, $id, $attr) = @_;
 
     croak "must specify a unique id"  unless defined $id;
     croak "must specify an attribute" unless defined $attr;
@@ -140,7 +140,7 @@
 
 # check whether a cached entry exists
 sub is_cached {
-    my($self, $id, $attr) = @_;
+    my ($self, $id, $attr) = @_;
 
     croak "must specify a unique id"  unless defined $id;
     croak "must specify an attribute" unless defined $attr;
@@ -151,14 +151,14 @@
 
 # invalidate cache (i.e. when a complete rebuild is forced)
 sub invalidate {
-    my($self) = @_;
+    my ($self) = @_;
 
     $self->{cache} = {};
 }
 
 # delete an entry in the cache
 sub unset {
-    my($self, $id, $attr) = @_;
+    my ($self, $id, $attr) = @_;
 
     croak "must specify a unique id"  unless defined $id;
     croak "must specify an attribute" unless defined $attr;
@@ -172,14 +172,14 @@
 }
 
 sub is_hidden {
-    my($self, $id) = @_;
+    my ($self, $id) = @_;
     #print "$id is hidden\n" if $self->{cache}{$id}{_hidden};
     return $self->{cache}{$id}{_hidden};
 }
 
 # return the sequence number of $id in the list of linked objects (0..N)
 sub id2seq {
-    my($self, $id) = @_;
+    my ($self, $id) = @_;
     croak "must specify a unique id"  unless defined $id;
     if (exists $self->{cache}{$id}) {
         return $self->{cache}{$id}{seq};
@@ -193,7 +193,7 @@
 
 # return the $id at the place $seq in the list of linked objects (0..N)
 sub seq2id {
-    my($self, $seq) = @_;
+    my ($self, $seq) = @_;
 
     croak "must specify a seq number"  unless defined $seq;
     if ($self->{cache}{_ordered_ids} && defined $self->{cache}{_ordered_ids}->[$seq])
{
@@ -206,18 +206,18 @@
 
 
 sub ordered_ids {
-    my($self) = @_;
+    my ($self) = @_;
     return @{ $self->{cache}{_ordered_ids}||[] };
 }
 
 sub total_ids {
-    my($self) = @_;
+    my ($self) = @_;
     return scalar @{ $self->{cache}{_ordered_ids}||[] };
 }
 
 # remember the meta data of the index node
 sub index_node {
-    my($self) = shift;
+    my ($self) = shift;
 
     if (@_) {
         my %args = @_;
@@ -240,11 +240,11 @@
 
 # set/get the path to the parent cache
 sub parent_node {
-    my($self) = shift;
+    my ($self) = shift;
 
     if (@_) {
         # set
-        my($cache_path, $id, $rel_path) = @_;
+        my ($cache_path, $id, $rel_path) = @_;
         croak "must specify a path to the parent cache"
             unless defined $cache_path;
         croak "must specify a path relative to parent docset"
@@ -266,7 +266,7 @@
 
 # get the child node's cache if any
 sub child_cache_path {
-    my($self, $id) = @_;
+    my ($self, $id) = @_;
     croak "must specify a id"  unless defined $id;
 
     return exists $self->{cache}{$id}{child_cache_path}
@@ -277,7 +277,7 @@
 
 # set/get the path to the node_groups cache
 sub node_groups {
-    my($self) = shift;
+    my ($self) = shift;
 
     if (@_) { # set
         $self->{cache}{_node_groups} = shift;
@@ -290,7 +290,7 @@
 sub is_dirty { shift->{dirty};}
 
 sub DESTROY {
-    my($self) = @_;
+    my ($self) = @_;
 
     # flush the cache if destroyed before having a chance to sync to the disk
     $self->write if $self->is_dirty;
@@ -341,7 +341,7 @@
   my %index_node = $cache->index_node();
 
   $cache->parent_node($cache_path, $id, $rel_path);
-  my($cache_path, $id, $rel_path) = $cache->parent_node();
+  my ($cache_path, $id, $rel_path) = $cache->parent_node();
 
 
 =head1 DESCRIPTION

Modified: perl/modperl/docs/trunk/lib/DocSet/Config.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Config.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Config.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Config.pm Fri Sep  2 12:23:57 2005
@@ -36,13 +36,13 @@
 );
 
 sub ext2mime {
-    my($self, $ext) = @_;
+    my ($self, $ext) = @_;
     exists $ext2mime{$ext} ? $ext2mime{$ext} : undef;
 }
 
 
 sub conv_class {
-    my($self, $src_mime, $dst_mime) = @_;
+    my ($self, $src_mime, $dst_mime) = @_;
     # convert
     $self->croak("src_mime is not defined") unless defined $src_mime;
     $self->croak("dst_mime is not defined") unless defined $dst_mime;
@@ -60,7 +60,7 @@
                                    options copy_glob copy_skip dir
                                    file);
 sub read_config {
-    my($self, $config_file, $parent_o) = @_;
+    my ($self, $config_file, $parent_o) = @_;
     die "Configuration file is not specified" unless defined $config_file;
 
     $self->{config_file} = $config_file;
@@ -89,7 +89,7 @@
     my $group_size;
     my $non_grouped_node_seen = 0;
     for ( my $i=0; $i < @c; $i +=2 ) {
-        my($key, $val) = @c[$i, $i+1];
+        my ($key, $val) = @c[$i, $i+1];
         if ($key eq 'group') {
             $self->croak("grouped and non-grouped chapters cannot be mixed")
                 if $non_grouped_node_seen;
@@ -106,7 +106,7 @@
                 unless ref $val eq 'ARRAY';
             my @h = @$val;
             for ( my $j=0; $j < @h; $j +=2 ) {
-                my($key1, $val1) = @h[$j, $j+1];
+                my ($key1, $val1) = @h[$j, $j+1];
                 $self->croak("the 'hidden' attribute can include only: ",
                              join(", ", keys %hidden_attr),
                              "attributes, $key1 is invalid")
@@ -177,24 +177,24 @@
 # child config inherits parts from the parent config
 # and adjusts its paths
 sub merge_config {
-    my($self, $src_rel_dir) = @_;
+    my ($self, $src_rel_dir) = @_;
 
     my $parent_o = $self->{parent_o};
 
     # inherit 'file' attributes if not set in the child 
     my $files = $self->{file} || {};
-    while ( my($k, $v) = each %{ $parent_o->{file}||{} }) {
+    while ( my ($k, $v) = each %{ $parent_o->{file}||{} }) {
         $self->{file}{$k} = $v unless $files->{$k};
     }
 
     # inherit the 'dir' attributes if not set in the child 
     my $dirs = $self->{dir} || {};
-    while ( my($k, $v) = each %{ $parent_o->{dir}||{} }) {
+    while ( my ($k, $v) = each %{ $parent_o->{dir}||{} }) {
         $self->{dir}{$k} = $v unless exists $dirs->{$k};
     }
 
     # inherit/override the 'options' attr unless explicitly set
-    while ( my($k, $v) = each %{ $parent_o->{options}||{} }) {
+    while ( my ($k, $v) = each %{ $parent_o->{options}||{} }) {
         $self->{options}{$k} = $v unless exists $self->{options}{$k};
     }
 
@@ -223,6 +223,7 @@
 
     # inherit the 'copy_skip' attribute if not set in the child
     $self->{copy_skip} ||= $parent_o->{copy_skip} || [];
+
 }
 
 
@@ -230,7 +231,7 @@
 # simple OR, so if any of the sides sets an option to 1, this method
 # will return 1 otherwise 0
 sub options {
-    my($self, $option) = @_;
+    my ($self, $option) = @_;
     $option ||= '';
     return ($self->{options}{$option} || DocSet::RunTime::get_opts($option))
         ? 1 : 0;
@@ -290,7 +291,7 @@
 #
 # return the number of added items
 sub add_node {
-    my($self, $key, $value, $hidden) = @_;
+    my ($self, $key, $value, $hidden) = @_;
 
     my @values = ref $value eq 'ARRAY' ? @$value : $value;
 
@@ -367,12 +368,12 @@
 }
 
 sub set {
-    my($self, %args) = @_;
+    my ($self, %args) = @_;
     @{$self}{keys %args} = values %args;
 }
 
 sub set_dir {
-    my($self, %args) = @_;
+    my ($self, %args) = @_;
     @{ $self->{dir} }{keys %args} = values %args;
 }
 
@@ -477,13 +478,13 @@
 
 
 sub object_store {
-    my($self, $object) = @_;
+    my ($self, $object) = @_;
     $self->croak("no object passed") unless defined $object and ref $object;
     push @{ $self->{_objects_store} }, $object;
 }
 
 sub stored_objects {
-    my($self) = @_;
+    my ($self) = @_;
     return @{ $self->{_objects_store}||[] };
 }
 
@@ -494,7 +495,7 @@
     for my $sub (qw(carp cluck croak confess)) {
         undef &$sub if \&$sub; # overload Carp's functions
         *$sub = sub {
-            my($self, @msg) = @_;
+            my ($self, @msg) = @_;
             &{"Carp::$sub"}("[scan $sub] ", @msg, "\n",
                          "[config file: " . $self->{config_file} . "]\n"
                         );

Modified: perl/modperl/docs/trunk/lib/DocSet/Doc.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Doc.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Doc.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Doc.pm Fri Sep  2 12:23:57 2005
@@ -17,23 +17,25 @@
 }
 
 sub init {
-    my($self, %args) = @_;
-    while (my($k, $v) = each %args) {
+    my ($self, %args) = @_;
+    while (my ($k, $v) = each %args) {
         $self->{$k} = $v;
     }
 }
 
 sub scan {
-    my($self) = @_;
+    my ($self) = @_;
 
     note "+++ Scanning $self->{src_uri}";
     $self->src_read();
 
-    $self->retrieve_meta_data();
+    if (my $sub = $self->can('retrieve_meta_data')) {
+        $self->$sub();
+    }
 }
 
 sub render {
-    my($self, $cache) = @_;
+    my ($self, $cache) = @_;
 
     # if the object wasn't stored rescan
     #$self->scan() unless $self->meta;
@@ -69,7 +71,7 @@
 # sets $self->{content}
 #      $self->{timestamp}
 sub src_read {
-    my($self) = @_;
+    my ($self) = @_;
 
     # META: at this moment everything is a file path
     my $src_uri = "file://" . $self->{src_path};
@@ -88,7 +90,7 @@
         $self->{content} = \$content;
 
         # file change timestamp
-        # my($mon, $day, $year) = (localtime ( (stat($path))[9] ) )[4,3,5];
+        # my ($mon, $day, $year) = (localtime ( (stat($path))[9] ) )[4,3,5];
         # $self->{timestamp} = sprintf "%02d/%02d/%04d", ++$mon,$day,1900+$year;
         $self->{timestamp} = scalar localtime;
 
@@ -130,7 +132,7 @@
 # to abs_doc_root path and return it 
 # if not found return undef
 sub transform_src_doc {
-    my($self, $path) = @_;
+    my ($self, $path) = @_;
 
     if (my $path = find_src_doc($path)) {
         $path = catfile $self->{dir}{abs_doc_root}, $path;
@@ -143,7 +145,7 @@
 
 require Carp;
 sub croak {
-    my($self, @msg) = @_;
+    my ($self, @msg) = @_;
     Carp::croak("[render croak] ", @msg, "\n",
                 "[src path] $self->{src_path}\n"
                );
@@ -164,8 +166,9 @@
 
 =head1 SYNOPSIS
 
-   use DocSet::Doc::HTML ();
-   my $doc = DocSet::Doc::HTML->new(%args);
+   # e.g. a subclass would do
+   use DocSet::Doc::HTML2HTML ();
+   my $doc = DocSet::Doc::HTML2HTML->new(%args);
    $doc->scan();
    my $meta = $doc->meta();
    my $toc  = $doc->toc();

Modified: perl/modperl/docs/trunk/lib/DocSet/Doc/Common.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Doc/Common.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Doc/Common.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Doc/Common.pm Fri Sep  2 12:23:57 2005
@@ -105,7 +105,7 @@
 }
 
 sub pod_pom_html_view_seq_link_transform_path {
-    my($self, $path) = @_;
+    my ($self, $path) = @_;
 
     $path =~ s|::|/|g;
     my $doc_obj = get_render_obj();
@@ -126,7 +126,7 @@
 
 
 #sub make_href {
-#    my($url, $title) = @_;
+#    my ($url, $title) = @_;
 
 #    if (!defined $url) {
 #        return defined $title ? "<i>$title</i>"  : '';
@@ -138,7 +138,7 @@
 #}
 
 sub pod_pom_html_anchor {
-    my($self, $title) = @_;
+    my ($self, $title) = @_;
     my $anchor = "$title";
     $anchor =~ s/^\s*|\s*$//g; # strip leading and closing spaces
     $anchor =~ s/\W/_/g;

Modified: perl/modperl/docs/trunk/lib/DocSet/Doc/HTML2HTML.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Doc/HTML2HTML.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Doc/HTML2HTML.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Doc/HTML2HTML.pm Fri Sep  2 12:23:57 2005
@@ -14,7 +14,7 @@
 *fetch_src_doc_ver = \&DocSet::Doc::Common::fetch_src_doc_ver;
 
 sub convert {
-    my($self) = @_;
+    my ($self) = @_;
 
     my @body = $self->{parsed_tree}->{body};
     my $vars = {
@@ -36,7 +36,7 @@
 
 # need for pluggin docs into index files
 sub converted_body {
-    my($self) = @_;
+    my ($self) = @_;
 
     return $self->{parsed_tree}->{body};
 }

Modified: perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTML.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTML.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTML.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTML.pm Fri Sep  2 12:23:57 2005
@@ -23,7 +23,7 @@
 my %split_by = map {"head".$_ => 1} 1..4;
 
 sub convert {
-    my($self) = @_;
+    my ($self) = @_;
 
     set_render_obj($self);
 

Modified: perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTMLPS.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTMLPS.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTMLPS.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Doc/POD2HTMLPS.pm Fri Sep  2 12:23:57 2005
@@ -21,7 +21,7 @@
 my %split_by = map {"head".$_ => 1} 1..4;
 
 sub convert {
-    my($self) = @_;
+    my ($self) = @_;
 
     set_render_obj($self);
 
@@ -97,25 +97,25 @@
 
 sub view_head1 {
     my ($self, $head1) = @_;
-    return "<h2>" . $self->anchor($head1->title) . "</h2>\n\n" .
+    return "<h2>" . $head1->title . "</h2>\n\n" .
         $head1->content->present($self);
 }
 
 sub view_head2 {
     my ($self, $head2) = @_;
-    return "<h3>" . $self->anchor($head2->title) . "</h3>\n\n" .
+    return "<h3>" . $head2->title . "</h3>\n\n" .
         $head2->content->present($self);
 }
 
 sub view_head3 {
     my ($self, $head3) = @_;
-    return "<h4>" . $self->anchor($head3->title) . "</h4>\n\n" .
+    return "<h4>" . $head3->title . "</h4>\n\n" .
         $head3->content->present($self);
 }
 
 sub view_head4 {
     my ($self, $head4) = @_;
-    return "<h5>" . $self->anchor($head4->title) . "</h5>\n\n" .
+    return "<h5>" . $head4->title . "</h5>\n\n" .
         $head4->content->present($self);
 }
 

Modified: perl/modperl/docs/trunk/lib/DocSet/DocSet.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/DocSet.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/DocSet.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/DocSet.pm Fri Sep  2 12:23:57 2005
@@ -24,7 +24,7 @@
 }
 
 sub init {
-    my($self, $config_file, $parent_o, $src_rel_dir) = @_;
+    my ($self, $config_file, $parent_o, $src_rel_dir) = @_;
 
     $self->read_config($config_file, $parent_o);
 
@@ -53,7 +53,7 @@
 }
 
 sub scan {
-    my($self) = @_;
+    my ($self) = @_;
 
     my $src_root = $self->get_dir('src_root');
     my $purge = DocSet::RunTime::get_opts('rebuild_all') ? 1 : 0;
@@ -111,7 +111,7 @@
     my $hidden = 0;
     my @nodes_by_type = @{ $self->nodes_by_type };
     while (@nodes_by_type) {
-        my($type, $data) = splice @nodes_by_type, 0, 2;
+        my ($type, $data) = splice @nodes_by_type, 0, 2;
         if ($type eq 'docsets') {
             my $docset = $self->docset_scan_n_cache($data, $hidden);
             $self->modified(1) if $docset->modified();
@@ -141,7 +141,7 @@
     $hidden = 1;
     my @hidden_nodes_by_type = @{ $self->hidden_nodes_by_type };
     while (@hidden_nodes_by_type) {
-        my($type, $data) = splice @hidden_nodes_by_type, 0, 2;
+        my ($type, $data) = splice @hidden_nodes_by_type, 0, 2;
         if ($type eq 'docsets') {
             my $docset = $self->docset_scan_n_cache($data, $hidden);
             $self->object_store($docset)
@@ -168,7 +168,7 @@
     my $config_file = $self->{config_file};
 
     my $dst_index = "$dst_root/index.html";
-    my($should_update, $reason) = 
+    my ($should_update, $reason) = 
         $self->should_update($config_file, $dst_index);
     $self->modified(1) if $should_update;
 
@@ -180,7 +180,7 @@
             my $src_file = $body->{$sec};
             next unless $src_file;
             $src_file = catfile $src_root, $src_file;
-            my($should_update, $reason) = 
+            my ($should_update, $reason) = 
                 $self->should_update($src_file, $dst_index);
             $self->modified(1) if $should_update;
         }
@@ -204,7 +204,7 @@
 
 
 sub docset_scan_n_cache {
-    my($self, $src_rel_dir, $hidden) = @_;
+    my ($self, $src_rel_dir, $hidden) = @_;
 
     my $src_root = $self->get_dir('src_root');
     my $config_file =  "$src_root/$src_rel_dir/config.cfg";
@@ -238,7 +238,7 @@
 
 
 sub link_scan_n_cache {
-    my($self, $link, $hidden) = @_;
+    my ($self, $link, $hidden) = @_;
     my %meta = %$link; # make a copy
     my $id = delete $meta{id};
     $meta{title} = $meta{stitle} unless exists $meta{title};
@@ -248,7 +248,7 @@
 }
 
 sub sitemap_cache {
-    my($self, $link, $hidden) = @_;
+    my ($self, $link, $hidden) = @_;
     my %meta = %$link; # make a copy
     my $id = $meta{id};
     $meta{title}  = $meta{stitle} unless exists $meta{title};
@@ -264,7 +264,7 @@
 }
 
 sub chapter_scan_n_cache {
-    my($self, $src_file, $hidden) = @_;
+    my ($self, $src_file, $hidden) = @_;
 
     my $id = $src_file;
     $self->cache->add($id);
@@ -296,7 +296,7 @@
     $self->trg_chapters($rel_dst_path) unless $hidden;
 
     ### to rebuild or not
-    my($should_update, $reason) = $self->should_update($src_path, $dst_path);
+    my ($should_update, $reason) = $self->should_update($src_path, $dst_path);
     if (!$should_update) {
         note "--- $src_file: skipping ($reason)";
         return undef;
@@ -335,7 +335,7 @@
 
 ####################
 sub scan_copy_the_rest {
-    my($self) = @_;
+    my ($self) = @_;
 
     my @scan_copy_files = @{ $self->files_to_scan_copy() };
 
@@ -354,7 +354,7 @@
         $dst_path =~ s/\Q$src_root/$dst_root/;
 
         # to rebuild or not to rebuild
-        my($should_update, $reason) = 
+        my ($should_update, $reason) = 
             $self->should_update($src_path, $dst_path);
         if (!$should_update) {
             note "--- skipping cp $src_path $dst_path ($reason)";
@@ -369,7 +369,7 @@
 }
 
 sub render {
-    my($self) = @_;
+    my ($self) = @_;
 
     # if the docset wasn't modified, don't render the docset
     return unless $self->modified();
@@ -398,7 +398,7 @@
 
 ####################
 sub copy_the_rest {
-    my($self) = @_;
+    my ($self) = @_;
 
     my %copy_files = %{ $self->files_to_copy };
 
@@ -430,7 +430,7 @@
 }
 
 sub should_update {
-    my($self, $src_path, $dst_path) = @_;
+    my ($self, $src_path, $dst_path) = @_;
 
     unless (-e $src_path) {
         $self->error("cannot find $src_path");

Modified: perl/modperl/docs/trunk/lib/DocSet/DocSet/HTML.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/DocSet/HTML.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/DocSet/HTML.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/DocSet/HTML.pm Fri Sep  2 12:23:57 2005
@@ -32,7 +32,7 @@
 }
 
 sub complete {
-    my($self) = @_;
+    my ($self) = @_;
 
     note "\n";
     banner("[render] HTML DocSet: " . $self->get('title') );
@@ -45,7 +45,7 @@
 # generate the sitemap.html of the docset below the current root
 ##################################
 sub write_sitemap_file {
-    my($self) = @_;
+    my ($self) = @_;
 
     my $cache = $self->cache;
 
@@ -85,7 +85,7 @@
 # html files
 ##################################
 sub write_index_file {
-    my($self) = @_;
+    my ($self) = @_;
 
     my @toc  = ();
     my $cache = $self->cache;
@@ -98,7 +98,7 @@
     if (@node_groups && @ids) {
         # index's toc is built from groups of items' meta data
         while (@node_groups) {
-            my($title, $count) = splice @node_groups, 0, 2;
+            my ($title, $count) = splice @node_groups, 0, 2;
             push @toc, {
                 group_title => $title,
                 subs  => [map {$cache->get($_, 'meta')} 

Modified: perl/modperl/docs/trunk/lib/DocSet/DocSet/PSPDF.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/DocSet/PSPDF.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/DocSet/PSPDF.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/DocSet/PSPDF.pm Fri Sep  2 12:23:57 2005
@@ -32,7 +32,7 @@
 }
 
 sub complete {
-    my($self) = @_;
+    my ($self) = @_;
 
     note "\n";
     banner("[render] PS/PDF DocSet: " . $self->get('title') );
@@ -54,7 +54,7 @@
 # html files
 ##################################
 sub write_index_file {
-    my($self) = @_;
+    my ($self) = @_;
 
     my @toc  = ();
     my $cache = $self->cache;
@@ -67,7 +67,7 @@
     if (@node_groups && @ids) {
         # index's toc is built from groups of items' meta data
         while (@node_groups) {
-            my($title, $count) = splice @node_groups, 0, 2;
+            my ($title, $count) = splice @node_groups, 0, 2;
             push @toc, {
                 group_title => $title,
                 subs  => [map {$cache->get($_, 'meta')} 
@@ -152,7 +152,7 @@
 # generate the PS book
 ####################
 sub create_ps_book{
-    my($self) = @_;
+    my ($self) = @_;
 
     note "+++ Generating a PostScript Book";
 
@@ -170,7 +170,7 @@
 # generate the PDF book
 ####################
 sub create_pdf_book{
-    my($self) = @_;
+    my ($self) = @_;
 
     note "+++ Converting PS => PDF";
     my $dst_root = $self->get_dir('dst_root');

Modified: perl/modperl/docs/trunk/lib/DocSet/NavigateCache.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/NavigateCache.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/NavigateCache.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/NavigateCache.pm Fri Sep  2 12:23:57 2005
@@ -23,7 +23,7 @@
 
 # $rel_path (to the parent) is optional (e.g. root doesn't have a parent)
 sub new {
-    my($class, $cache_path, $id, $rel_path) = @_;
+    my ($class, $cache_path, $id, $rel_path) = @_;
 
     croak "no cache path specified" unless defined $cache_path;
 
@@ -44,13 +44,13 @@
 }
 
 sub parent_rel_path {
-    my($self) = @_;
+    my ($self) = @_;
     return defined $self->[REL_PATH] ? $self->[REL_PATH] : undef;
 }
 
 # get next item's object or undef if there are no more
 sub next {
-    my($self) = @_;
+    my ($self) = @_;
     my $cache    = $self->[CACHE];
 
     my $seq      = $cache->id2seq($self->[ID]);
@@ -74,7 +74,7 @@
 
 # get prev node's object or undef if there are no more
 sub prev {
-    my($self) = @_;
+    my ($self) = @_;
     my $cache = $self->[CACHE];
     my $seq = $cache->id2seq($self->[ID]);
 
@@ -96,14 +96,14 @@
 
 # get the object by its id (string) within the current cache
 sub by_id {
-    my($self, $id) = @_;
+    my ($self, $id) = @_;
     return defined $id ? $self->new($self->[CUR_PATH], $id) : undef;
 }
 
 
 # get the object of the first item on the same level
 sub first {
-    my($self) = @_;
+    my ($self) = @_;
     my $cache    = $self->[CACHE];
 
     # it's possible that the whole docset is made of hidden objects.
@@ -126,14 +126,14 @@
 
 # the index node of the current level
 sub index_node {
-    my($self) = @_;
+    my ($self) = @_;
     return $self->[CACHE]->index_node;
 }
 
 # get the object of the parent
 sub up {
-    my($self) = @_;
-    my($path, $id, $rel_path) = $self->[CACHE]->parent_node;
+    my ($self) = @_;
+    my ($path, $id, $rel_path) = $self->[CACHE]->parent_node;
 
     $rel_path = "." unless defined $rel_path;
     if (defined $self->[REL_PATH] && length $self->[REL_PATH]) {
@@ -162,7 +162,7 @@
 # e.g.: $o->down->first - first() will return undef if the first is
 # hidden.
 sub down {
-    my($self) = @_;
+    my ($self) = @_;
 
     if (my $path = $self->[CACHE]->child_cache_path($self->[ID])) {
         return $self->new($path);
@@ -174,13 +174,13 @@
 
 # retrieve the meta data of the current node
 sub meta {
-    my($self) = @_;
+    my ($self) = @_;
     return $self->[CACHE]->get($self->[ID], 'meta');
 }
 
 # retrieve the node groups
 sub node_groups {
-    my($self) = @_;
+    my ($self) = @_;
 #print "OK: "; 
 #dumper $self->[CACHE]->node_groups;
     return $self->[CACHE]->node_groups;
@@ -192,7 +192,7 @@
 
 
 sub get_cache {
-    my($path) = @_;
+    my ($path) = @_;
 
     unless ($CACHE{$path}) {
         $CACHE{$path} = DocSet::Cache->new($path);

Modified: perl/modperl/docs/trunk/lib/DocSet/RunTime.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/RunTime.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/RunTime.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/RunTime.pm Fri Sep  2 12:23:57 2005
@@ -28,14 +28,14 @@
 }
 
 sub register {
-    my($register, $key, $val) = @_;
+    my ($register, $key, $val) = @_;
     push @{$registers{$register}{$key}}, $val;
     return @{ $registers{$register}{$key} || []};
 }
 
 
 sub set_opt {
-    my(%args) = ();
+    my (%args) = ();
     if (@_ == 1) {
         my $arg = shift;
         my $ref = ref $arg;
@@ -87,7 +87,7 @@
 }
 
 sub scan_src_docs {
-    my($base, $ra_search_paths, $ra_search_exts) = @_;
+    my ($base, $ra_search_paths, $ra_search_exts) = @_;
 
     @search_paths = @{$ra_search_paths || []};
 
@@ -127,7 +127,7 @@
 
 # this function returns a URI, so its separators are always /
 sub find_src_doc {
-    my($resource_rel_path) = @_;
+    my ($resource_rel_path) = @_;
 
     # push the html extension, because of autogenerated index.html,
     # which should be found automatically

Modified: perl/modperl/docs/trunk/lib/DocSet/Source/HTML.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Source/HTML.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Source/HTML.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Source/HTML.pm Fri Sep  2 12:23:57 2005
@@ -12,7 +12,7 @@
 use constant ENCODE_CHARS => '<>&" ';
 
 sub retrieve_meta_data {
-    my($self) = @_;
+    my ($self) = @_;
 
     $self->parse;
 
@@ -54,7 +54,7 @@
 }
 
 sub parse {
-    my($self) = @_;
+    my ($self) = @_;
     
     # already parsed
     return if exists $self->{parsed_tree} && $self->{parsed_tree};
@@ -75,7 +75,7 @@
 
         # encode unsafe chars in the URL attributes
         sub start_h {
-            my($self, $tagname, $attr, $text) = @_;
+            my ($self, $tagname, $attr, $text) = @_;
 
             # store away the HTML as is
             unless ($linkElements{$tagname}) {
@@ -97,12 +97,12 @@
         }
 
         sub end_h {
-            my($self, $tagname) = @_;
+            my ($self, $tagname) = @_;
             accum_h($self, "</$tagname>");
         }
 
         sub text_h {
-            my($self, $text) = @_;
+            my ($self, $text) = @_;
             accum_h($self, $text);
         }
 
@@ -131,7 +131,7 @@
 
         # init
         my $start_h = sub {
-            my($self, $tagname, $attr, $text) = @_;
+            my ($self, $tagname, $attr, $text) = @_;
             my $meta = $self->{parsed_tree}{head}{meta};
 
             # special treatment
@@ -169,7 +169,7 @@
         };
     
         my $end_h = sub {
-            my($self, $tagname, $skipped_text) = @_;
+            my ($self, $tagname, $skipped_text) = @_;
             # use $p itself as a tmp storage (ok according to the docs)
             # <title> and <body> get special treatment
             if ($tagname eq 'title' or $tagname eq 'body') { 

Modified: perl/modperl/docs/trunk/lib/DocSet/Source/POD.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Source/POD.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Source/POD.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Source/POD.pm Fri Sep  2 12:23:57 2005
@@ -19,7 +19,7 @@
 my $mode = 'Pod::POM::View::HTML';
 
 sub retrieve_meta_data {
-    my($self) = @_;
+    my ($self) = @_;
 
     $self->parse_pod;
 
@@ -91,7 +91,7 @@
 }
 
 sub render_toc_level {
-    my($self, $node, $level) = @_;
+    my ($self, $node, $level) = @_;
     my $title = $node->title;
     my $link = "$title";     # must stringify to get the raw string
     $link =~ s/^\s*|\s*$//g; # strip leading and closing spaces
@@ -123,7 +123,7 @@
 
 
 sub parse_pod {
-    my($self) = @_;
+    my ($self) = @_;
     
     # already parsed
     return if exists $self->{parsed_tree} && $self->{parsed_tree};
@@ -157,7 +157,7 @@
 }
 
 sub extract_pod {
-    my($self) = @_;
+    my ($self) = @_;
 
     my @pod = ();
     my $in_pod = 0;
@@ -181,7 +181,7 @@
 }
 
 sub podify_items {
-    my($self) = @_;
+    my ($self) = @_;
   
     # tmp storage
     my @paras = ();
@@ -226,7 +226,7 @@
 
 # add a page break for =headX in slides mode
 sub head2page_breaks {
-    my($self) = @_;
+    my ($self) = @_;
   
     # we want the source in paragraphs
     my @content = split /\n\n/, ${ $self->{content} };

Modified: perl/modperl/docs/trunk/lib/DocSet/Util.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/lib/DocSet/Util.pm?rev=267279&r1=267278&r2=267279&view=diff
==============================================================================
--- perl/modperl/docs/trunk/lib/DocSet/Util.pm (original)
+++ perl/modperl/docs/trunk/lib/DocSet/Util.pm Fri Sep  2 12:23:57 2005
@@ -33,7 +33,7 @@
 # be created.
 ###############
 sub copy_file {
-    my($src, $dst) = @_;
+    my ($src, $dst) = @_;
 
     die "$src doesn't exist" unless -e $src;
     my $mode = (stat _)[2];
@@ -51,7 +51,7 @@
 # gzip a file at $src_path
 ###############
 sub gzip_file {
-    my($src) = @_;
+    my ($src) = @_;
     system "gzip -f $src";
 }
 
@@ -61,7 +61,7 @@
 # paragraphs
 ###############
 sub write_file {
-    my($filename, $content) = @_;
+    my ($filename, $content) = @_;
 
     # make sure that the directory exist or create one
     my $dir = File::Basename::dirname $filename;
@@ -87,7 +87,7 @@
 # assign to a ref to a scalar
 ###############
 sub read_file {
-    my($filename, $r_content) = @_;
+    my ($filename, $r_content) = @_;
 
     my $fh = Symbol::gensym;
     open $fh, $filename  or croak "Can't open $filename for reading: $!";
@@ -102,7 +102,7 @@
 # content will be set into a ref to an array
 ###############
 sub read_file_paras {
-    my($filename, $ra_content) = @_;
+    my ($filename, $ra_content) = @_;
 
     my $fh = Symbol::gensym;
     open $fh, $filename  or croak "Can't open $filename for reading: $!";
@@ -114,7 +114,7 @@
 
 # return the filename part of the path
 sub filename {
-    my($path) = @_;
+    my ($path) = @_;
     return File::Basename::basename($path);
 }
 
@@ -122,7 +122,7 @@
 # note: that '/foo/bar.conf.in' returns an extension: 'conf.in';
 # note: a hidden file .foo will be recognized as an extension 'foo'
 sub filename_ext {
-    my($filename) = @_;
+    my ($filename) = @_;
     my $ext = (File::Basename::fileparse($filename, '\.[^\.]*'))[2] || '';
     $ext =~ s/^\.(.*)/lc $1/e;
     $ext;
@@ -180,7 +180,7 @@
 # returns the processed template
 ###################
 sub proc_tmpl {
-    my($tmpl_root, $tmpl_file, $mode, $vars) = @_;
+    my ($tmpl_root, $tmpl_file, $mode, $vars) = @_;
 
     # append the specific rendering mode, so the correct template will
     # be picked (e.g. in 'ps' mode, the ps sub-dir(s) will be searched
@@ -211,7 +211,7 @@
 
 
 sub banner {
-    my($string) = @_;
+    my ($string) = @_;
 
     my $len = length($string) + 8;
     note(
@@ -300,8 +300,8 @@
 
 
 #sub sub_trace {
-##    my($package) = (caller(0))[0];
-#    my($sub) = (caller(1))[3];
+##    my ($package) = (caller(0))[0];
+#    my ($sub) = (caller(1))[3];
 #    print "=> $sub: @_\n";
 #}
 



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message