[Bps-public-commit] masonx-profiler branch master updated. a291b73432b0a5ad5f001be7d7fd1681cac89a45

BPS Git Server git at git.bestpractical.com
Fri Jul 15 18:49:31 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "masonx-profiler".

The branch, master has been updated
       via  a291b73432b0a5ad5f001be7d7fd1681cac89a45 (commit)
       via  fa6e2e14193263a5c44c97768866727aadd8e40d (commit)
       via  e8de02c6f9ddc6df715b9c4126868b9d375736ca (commit)
       via  498be1415c5211296686004d4658c47eb0ccc06a (commit)
      from  11d6dda207f2dd70f98658256d7710ef97766556 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a291b73432b0a5ad5f001be7d7fd1681cac89a45
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 15 14:48:41 2022 -0400

    Ignore generated distribution files

diff --git a/.gitignore b/.gitignore
index 3545f62..40f5e9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ pm_to_blib
 blib/
 MYMETA.*
 .*.sw?
+MasonX-Profiler-*
+MasonX-Profiler-*.tar.gz
\ No newline at end of file
commit fa6e2e14193263a5c44c97768866727aadd8e40d
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 15 14:42:46 2022 -0400

    Update SIGNATURE

diff --git a/SIGNATURE b/SIGNATURE
index de049d8..86bde3b 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -1,39 +1,44 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.39.
+signed via the Module::Signature module, version 0.79.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
 
     % cpansign -v
 
-It would check each file's integrity, as well as the signature's
+It will check each file's integrity, as well as the signature's
 validity.  If "==> Signature verified OK! <==" is not displayed,
 the distribution may already have been compromised, and you should
 not run its Makefile.PL or Build.PL.
 
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
 
 SHA1 2d47ca67715e26ce64eaf8d6615e2924f48f9721 Changes
-SHA1 54199f510aab07b15dcc6742309d0a8a1d15fea1 MANIFEST
-SHA1 dc1878c934ccbc3a984a12eae0952b0cd058e5b9 META.yml
-SHA1 f807185f57fc1f0eef1fb7a780fa8070d357f594 Makefile.PL
-SHA1 4a80c641dff1df22959f6e9bd91c1ab5c0f01deb README
-SHA1 2b65fc08c268c16ae7097d800bacccc7b8c9c905 inc/Module/Install.pm
-SHA1 fd56d5c793014bccac2cd1e61926c4da8538ef99 inc/Module/Install/Base.pm
-SHA1 9ce6768a7b8f7032ec89594b773fafd58c6feb1d inc/Module/Install/Can.pm
-SHA1 b6c8f0f22c4c8ba48a7bac2c5e4bd61803a7b097 inc/Module/Install/Fetch.pm
-SHA1 aabcd47178e4e7b27e340ff5273269c93697c9c1 inc/Module/Install/Makefile.pm
-SHA1 207dfa13341a374fc78325fbeb99bc36659aef2d inc/Module/Install/Metadata.pm
-SHA1 aff9341a15c04faec47089851e43d9d4061337e7 inc/Module/Install/Win32.pm
-SHA1 8e0d347ca21bc18b380d9d1aa5910b8d078a76b7 inc/Module/Install/WriteAll.pm
-SHA1 94526ff2fd197d6cf367aca449c68b17affe2845 lib/MasonX/Profiler.pm
-SHA1 033300efbe0805de6e633458f9940601c5970564 t/0-signature.t
-SHA1 325569eebed2092e7596f87782413fc17e5c07ae t/1-basic.t
+SHA1 2c329b115cbacaefcebf398938529532fe2b8881 MANIFEST
+SHA1 b7a55b1d43f5623d46c40b9e7024738b94918f95 META.yml
+SHA1 52bf939a7e70791e2dc60c4acb7e42f64cd7ef8f Makefile.PL
+SHA1 2bc0984ff7ee638afbfd194ec547fcc447a0ea73 README
+SHA1 c3f8f9f2a209f80b7ca3c8af3a6b1b7b408ad620 inc/Module/Install.pm
+SHA1 de30b539a326675c42e6ad360fddb05902d621be inc/Module/Install/Base.pm
+SHA1 81fffeca82bcd7100d8435b139f0780fcc5cdf9c inc/Module/Install/Can.pm
+SHA1 b4dd9cb3cf0cb60390c575bd3405e2297d4a0b1a inc/Module/Install/Fetch.pm
+SHA1 b84cf97b12f8e5ef37bea54e33ddce32dff804d1 inc/Module/Install/Makefile.pm
+SHA1 0d9fd69718198fcd1560214c4f23fcaa44f8395e inc/Module/Install/Metadata.pm
+SHA1 8d19f4485276b987b7838d4ec01909f8055a4724 inc/Module/Install/ReadmeFromPod.pm
+SHA1 99b8179fbd9e05422b161cf91abe198744188064 inc/Module/Install/Win32.pm
+SHA1 6a91e14bbecc64e9c8e2261dfa4b360641d152e4 inc/Module/Install/WriteAll.pm
+SHA1 bb80e1536f95ab691ba05ace76e92288be17283b lib/MasonX/Profiler.pm
+SHA1 7f2e13f5f6a798d52ea897d24d07b49af4039341 t/0-signature.t
+SHA1 5c83a3c78f6cd8b5af799a976bf5e8dc13315ecd t/1-basic.t
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.3 (FreeBSD)
 
-iD8DBQFA2EXJtLPdNzw1AaARAgVgAJ9VFXE+iweg4lu5/EcJ1Lq7S4gczACeIKXL
-UrBkkk/Ei6+DWxH6ff2H9WE=
-=CcjM
+iQEzBAEBCAAdFiEEFelFwSnB+u9xCpouFedxUadmpRQFAmLRtMkACgkQFedxUadm
+pRTjjgf/R7LXoe7LArCOCdGz9kUIZ8LbV1hFE/fdfh9NlhNeijXYbchDtz++eIVg
+n8ZltIOGrn9OvBUnRDLBOrHNSlYr3Vg+A+ucErMVkCMzx2TE5X84agrBGYrm/jTX
+QAeD3vUfOQIa68FofPaoMrHNPLrOwfsDDYtI/P0Arn+akd0ihgQK4sjWDf660CJ6
+Tx8OkcH19ZF8vhYaS2t3/e9bPsh5gw7MAsXx7hw7NyZi1LdblhuyN7OujXRz2EBu
+TVSYLmgQyg1eg951pwwLGNl3xODvpk17jytLeJgRIYTcZhnYdQaVYgTIMlWTge9e
+1AG3kDUh+nBONXUsPFwfCJL7NuZW7Q==
+=Ab0z
 -----END PGP SIGNATURE-----
commit e8de02c6f9ddc6df715b9c4126868b9d375736ca
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 15 14:39:29 2022 -0400

    Update Makefile to build README from pod

diff --git a/MANIFEST b/MANIFEST
index 2982ce0..3538409 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5,6 +5,7 @@ inc/Module/Install/Can.pm
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/MasonX/Profiler.pm
diff --git a/Makefile.PL b/Makefile.PL
index a240d15..15c814b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,13 +1,12 @@
-#!/usr/bin/env perl
-
+BEGIN { push @INC, '.' }
 use inc::Module::Install;
 
-name		('MasonX-Profiler');
-author_from	('lib/MasonX/Profiler.pm');
-abstract_from	('lib/MasonX/Profiler.pm');
-version_from	('lib/MasonX/Profiler.pm');
-requires	('HTML::Mason', 0);
-requires	('Time::HiRes', 0);
-license		('perl');
+name ('MasonX-Profiler');
+all_from ('lib/MasonX/Profiler.pm');
+readme_from ('lib/MasonX/Profiler.pm');
+requires ('HTML::Mason', 0);
+requires ('Time::HiRes', 0);
+license ('perl');
 
-WriteAll( sign => 1 );
+sign;
+WriteAll();
diff --git a/README b/README
index 81e26f8..a98531e 100644
--- a/README
+++ b/README
@@ -1,27 +1,65 @@
-# $File: //member/autrijus/MasonX-Profiler/README $ $Author: autrijus $
-# $Revision: #2 $ $Change: 10888 $ $DateTime: 2004/06/17 00:16:20 $
+NAME
+    MasonX::Profiler - Mason per-component profiler
 
-This is the README file for MasonX::Profiler, a per-component profiler
-extension for HTML::Mason.
+VERSION
+    This document describes version 0.07 of MasonX::Profiler.
 
-Please type "perldoc MasonX::Profiler" after installation to see
-the module usage information.
+SYNOPSIS
+    In the Mason handler:
 
-* Installation
+        use MasonX::Profiler;
+        my $ah = HTML::Mason::ApacheHandler->new(
+            preamble => 'my $p = MasonX::Profiler->new($m, $r);',
+            # ...
+        );
 
-MasonX::Profiler uses the standard perl module install process:
+    Note that CGIHandler and Apache2Handler works, too.
 
-cpansign -v		# optional; see SIGNATURE for details
-perl Makefile.PL
-make			# or 'nmake' on Win32
-make test
-make install
+    Alternatively, in httpd.conf, before loading your "PerlHandler":
 
-* Copyright
+        PerlModule MasonX::Profiler
+        PerlSetVar MasonPreamble "my $p = MasonX::Profiler->new($m, $r);"
 
-Copyright 2002, 2003, 2004 by Autrijus Tang <autrijus at autrijus.org>.
+    Note that if you are using virtual hosts, the two lines above must be
+    inside the "<VirtualHost>" block, not outside it.
 
-All rights reserved.  You can redistribute and/or modify
-this bundle under the same terms as Perl itself.
+INSTALLATION
+    MasonX::Profiler uses the standard perl module install process:
+
+        cpansign -v        # optional; see SIGNATURE for details
+        perl Makefile.PL
+        make           # or 'nmake' on Win32
+        make test
+        make install
+
+DESCRIPTION
+    This module prints per-component profiling information to "STDERR"
+    (usually directed to the Apache error log). Its output looks like this:
+
+        =Mason= 127.0.0.1 - /NoAuth/webrt.css BEGINS {{{
+        =Mason= 127.0.0.1 -     /NoAuth/webrt.css {{{
+        =Mason= 127.0.0.1 -         /Elements/Callback {{{
+        =Mason= 127.0.0.1 -         /Elements/Callback }}} 0.0008
+        =Mason= 127.0.0.1 -     /NoAuth/webrt.css }}} 0.0072
+        =Mason= 127.0.0.1 - /NoAuth/webrt.css }}} ENDS
+
+    Each row contains five whitespace-separated fields: "=Mason=", remote IP
+    address, "-", indented component name, and how many seconds did it take
+    to process that component, including all subcomponents called by it.
+
+    The beginning and end of the initial request is represented by the
+    special time fields "BEGINS" and "ENDS".
+
+AUTHORS
+    Best Practical Solutions, LLC <modules at bestpractical.com>
+
+    Autrijus Tang <autrijus at autrijus.org>
+
+COPYRIGHT
+    Copyright 2002, 2003, 2004 by Autrijus Tang <autrijus at autrijus.org>.
+
+    This program is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself.
+
+    See <http://www.perl.com/perl/misc/Artistic.html>
 
-See <http://www.perl.com/perl/misc/Artistic.html>.
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
new file mode 100644
index 0000000..3738232
--- /dev/null
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -0,0 +1,184 @@
+#line 1
+package Module::Install::ReadmeFromPod;
+
+use 5.006;
+use strict;
+use warnings;
+use base qw(Module::Install::Base);
+use vars qw($VERSION);
+
+$VERSION = '0.30';
+
+{
+
+    # these aren't defined until after _require_admin is run, so
+    # define them so prototypes are available during compilation.
+    sub io;
+    sub capture(&;@);
+
+#line 28
+
+    my $done = 0;
+
+    sub _require_admin {
+
+	# do this once to avoid redefinition warnings from IO::All
+	return if $done;
+
+	require IO::All;
+	IO::All->import( '-binary' );
+
+	require Capture::Tiny;
+	Capture::Tiny->import ( 'capture' );
+
+	return;
+    }
+
+}
+
+sub readme_from {
+  my $self = shift;
+  return unless $self->is_admin;
+
+  _require_admin;
+
+  # Input file
+  my $in_file  = shift || $self->_all_from
+    or die "Can't determine file to make readme_from";
+
+  # Get optional arguments
+  my ($clean, $format, $out_file, $options);
+  my $args = shift;
+  if ( ref $args ) {
+    # Arguments are in a hashref
+    if ( ref($args) ne 'HASH' ) {
+      die "Expected a hashref but got a ".ref($args)."\n";
+    } else {
+      $clean    = $args->{'clean'};
+      $format   = $args->{'format'};
+      $out_file = $args->{'output_file'};
+      $options  = $args->{'options'};
+    }
+  } else {
+    # Arguments are in a list
+    $clean    = $args;
+    $format   = shift;
+    $out_file = shift;
+    $options  = \@_;
+  }
+
+  # Default values;
+  $clean  ||= 0;
+  $format ||= 'txt';
+
+  # Generate README
+  print "readme_from $in_file to $format\n";
+  if ($format =~ m/te?xt/) {
+    $out_file = $self->_readme_txt($in_file, $out_file, $options);
+  } elsif ($format =~ m/html?/) {
+    $out_file = $self->_readme_htm($in_file, $out_file, $options);
+  } elsif ($format eq 'man') {
+    $out_file = $self->_readme_man($in_file, $out_file, $options);
+  } elsif ($format eq 'md') {
+    $out_file = $self->_readme_md($in_file, $out_file, $options);
+  } elsif ($format eq 'pdf') {
+    $out_file = $self->_readme_pdf($in_file, $out_file, $options);
+  }
+
+  if ($clean) {
+    $self->clean_files($out_file);
+  }
+
+  return 1;
+}
+
+
+sub _readme_txt {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README';
+  require Pod::Text;
+  my $parser = Pod::Text->new( @$options );
+  my $io = io->file($out_file)->open(">");
+  my $out_fh = $io->io_handle;
+  $parser->output_fh( *$out_fh );
+  $parser->parse_file( $in_file );
+  return $out_file;
+}
+
+
+sub _readme_htm {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.htm';
+  require Pod::Html;
+  my ($o) = capture {
+    Pod::Html::pod2html(
+      "--infile=$in_file",
+      "--outfile=-",
+      @$options,
+    );
+  };
+  io->file($out_file)->print($o);
+  # Remove temporary files if needed
+  for my $file ('pod2htmd.tmp', 'pod2htmi.tmp') {
+    if (-e $file) {
+      unlink $file or warn "Warning: Could not remove file '$file'.\n$!\n";
+    }
+  }
+  return $out_file;
+}
+
+
+sub _readme_man {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.1';
+  require Pod::Man;
+  my $parser = Pod::Man->new( @$options );
+  my $io = io->file($out_file)->open(">");
+  my $out_fh = $io->io_handle;
+  $parser->output_fh( *$out_fh );
+  $parser->parse_file( $in_file );
+  return $out_file;
+}
+
+
+sub _readme_pdf {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.pdf';
+  eval { require App::pod2pdf; }
+    or die "Could not generate $out_file because pod2pdf could not be found\n";
+  my $parser = App::pod2pdf->new( @$options );
+  $parser->parse_from_file($in_file);
+  my ($o) = capture { $parser->output };
+  io->file($out_file)->print($o);
+  return $out_file;
+}
+
+sub _readme_md {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.md';
+  require Pod::Markdown;
+  my $parser = Pod::Markdown->new( @$options );
+  my $io = io->file($out_file)->open(">");
+  my $out_fh = $io->io_handle;
+  $parser->output_fh( *$out_fh );
+  $parser->parse_file( $in_file );
+  return $out_file;
+}
+
+
+sub _all_from {
+  my $self = shift;
+  return unless $self->admin->{extensions};
+  my ($metadata) = grep {
+    ref($_) eq 'Module::Install::Metadata';
+  } @{$self->admin->{extensions}};
+  return unless $metadata;
+  return $metadata->{values}{all_from} || '';
+}
+
+'Readme!';
+
+__END__
+
+#line 316
+
commit 498be1415c5211296686004d4658c47eb0ccc06a
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 15 14:38:17 2022 -0400

    Add installation section to main docs

diff --git a/lib/MasonX/Profiler.pm b/lib/MasonX/Profiler.pm
index 31855cf..0fea1a0 100644
--- a/lib/MasonX/Profiler.pm
+++ b/lib/MasonX/Profiler.pm
@@ -10,8 +10,7 @@ MasonX::Profiler - Mason per-component profiler
 
 =head1 VERSION
 
-This document describes version 0.06 of MasonX::Profiler, released
-June 22, 2004.
+This document describes version 0.07 of MasonX::Profiler.
 
 =head1 SYNOPSIS
 
@@ -19,8 +18,8 @@ In the Mason handler:
 
     use MasonX::Profiler;
     my $ah = HTML::Mason::ApacheHandler->new(
-	preamble => 'my $p = MasonX::Profiler->new($m, $r);',
-	# ...
+        preamble => 'my $p = MasonX::Profiler->new($m, $r);',
+        # ...
     );
 
 Note that B<CGIHandler> and B<Apache2Handler> works, too.
@@ -33,6 +32,16 @@ Alternatively, in F<httpd.conf>, before loading your C<PerlHandler>:
 Note that if you are using virtual hosts, the two lines above must be
 inside the C<E<lt>VirtualHostE<gt>> block, not outside it.
 
+=head1 INSTALLATION
+
+MasonX::Profiler uses the standard perl module install process:
+
+    cpansign -v        # optional; see SIGNATURE for details
+    perl Makefile.PL
+    make           # or 'nmake' on Win32
+    make test
+    make install
+
 =head1 DESCRIPTION
 
 This module prints per-component profiling information to C<STDERR>
-----------------------------------------------------------------------

Summary of changes:
 .gitignore                          |   2 +
 MANIFEST                            |   1 +
 Makefile.PL                         |  19 ++--
 README                              |  74 +++++++++++----
 SIGNATURE                           |  49 +++++-----
 inc/Module/Install/ReadmeFromPod.pm | 184 ++++++++++++++++++++++++++++++++++++
 lib/MasonX/Profiler.pm              |  17 +++-
 7 files changed, 292 insertions(+), 54 deletions(-)
 create mode 100644 inc/Module/Install/ReadmeFromPod.pm


hooks/post-receive
-- 
masonx-profiler


More information about the Bps-public-commit mailing list