[Http-webtest-commits] CVS: HTTP-WebTest/scripts pod_merge.PL,1.1.1.1,1.2
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2002-05-15 19:27:19
|
Update of /cvsroot/http-webtest/HTTP-WebTest/scripts In directory usw-pr-cvs1:/tmp/cvs-serv7800/scripts Modified Files: pod_merge.PL Log Message: Include non-core params into HTTP::WebTest POD doc Index: pod_merge.PL =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/scripts/pod_merge.PL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pod_merge.PL 24 Jan 2002 12:26:38 -0000 1.1.1.1 --- pod_merge.PL 15 May 2002 19:27:16 -0000 1.2 *************** *** 55,59 **** $sections{params} = ''; for my $plugin (@plugins) { ! $sections{params} .= file_scan($plugin, 'params'); } --- 55,62 ---- $sections{params} = ''; for my $plugin (@plugins) { ! my $core_params = file_scan($plugin, 'params'); ! my $opt_params = mark_non_core(file_scan($plugin, 'opt_params')); ! $sections{params} .= $core_params; ! $sections{params} .= $opt_params; } *************** *** 86,92 **** my $regex = section_copy_re($type); ! my @sections = $data =~ /$regex/g; ! return join '', @sections; } --- 89,97 ---- my $regex = section_copy_re($type); ! my $section = join '', $data =~ /$regex/g; ! my($package) = $data =~ /package \s+ ( \w+ (?: :: \w+)* )/gx; ! ! return wantarray ? ($section, $package) : $section; } *************** *** 104,109 **** } ! # returns regexp used to replace everthing between =for pod_merge ! # replace and =cut sub section_replace_re { my $type = shift; --- 109,114 ---- } ! # returns regexp which can be used to replace everthing between =for ! # pod_merge replace and =cut sub section_replace_re { my $type = shift; *************** *** 115,117 **** --- 120,132 ---- return $regex; + } + + # adds NON-CORE PARAMETER line to parameter definition + sub mark_non_core { + my $sec = shift; + my $package = shift; + $sec =~ s/(?<= \n) + (=head2 \s+ \w+ \s*? \n) + /$1\nI<NON-CORE PARAMETER> from L<$package>\n/gsx; + return $sec; } |