* [RFC PATCH] nmbug help w/o perldoc
@ 2011-11-15 16:11 Tomi Ollila
2011-11-16 17:44 ` Jameson Graef Rollins
0 siblings, 1 reply; 3+ messages in thread
From: Tomi Ollila @ 2011-11-15 16:11 UTC (permalink / raw)
To: notmuch
---
notmuch help runs pod2usage with -verbose => 2, which by default
tries to run perldoc. Adding -noperldoc => 1 disables this use
but there is no pre-verifying interface (or so) available.
In one of my systems there was no 'perldoc' script, which basically
contains:
use Pod::PerlDoc;
exit( Pod::Perldoc->run() );
However, the system has Pod/Perldoc.pm installed.
This patch demonstraces how Perldoc.pm can be used directly from perl
program. This is probably not the best way, but 'man Perldoc' does not
mention any other way to use the module.
If you have problems running 'notmuch help' (it prints contents of the
command instead of help) and/or are otherwise interested the problem
look this patch and if you have ideas/knowledge how to improve it please
reply to this e-mail.
contrib/nmbug | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/contrib/nmbug b/contrib/nmbug
index bb0739f..343fe10 100755
--- a/contrib/nmbug
+++ b/contrib/nmbug
@@ -5,7 +5,6 @@
use strict;
use warnings;
use File::Temp qw(tempdir);
-use Pod::Usage;
no encoding;
@@ -467,14 +466,16 @@ sub decode_from_fs {
sub usage {
- pod2usage ();
+ require Pod::Usage;
+ Pod::Usage::pod2usage ();
exit (1);
}
sub do_help {
- pod2usage ( -verbose => 2 );
- exit (0);
+ require Pod::Perldoc;
+ @ARGV = ( $0 );
+ exit ( Pod::Perldoc->run() );
}
__END__
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] nmbug help w/o perldoc
2011-11-15 16:11 [RFC PATCH] nmbug help w/o perldoc Tomi Ollila
@ 2011-11-16 17:44 ` Jameson Graef Rollins
2011-11-16 17:49 ` Tomi Ollila
0 siblings, 1 reply; 3+ messages in thread
From: Jameson Graef Rollins @ 2011-11-16 17:44 UTC (permalink / raw)
To: Tomi Ollila, notmuch
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
On Tue, 15 Nov 2011 18:11:16 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
>
> ---
Hey, Tomi. Your '---' separator is in the wrong place! You wrote this
nice long log message, but it won't be attached to the commit because
it's below the body separator.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] nmbug help w/o perldoc
2011-11-16 17:44 ` Jameson Graef Rollins
@ 2011-11-16 17:49 ` Tomi Ollila
0 siblings, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2011-11-16 17:49 UTC (permalink / raw)
To: Jameson Graef Rollins, Tomi Ollila, notmuch
On Wed, 16 Nov 2011 09:44:03 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Tue, 15 Nov 2011 18:11:16 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> >
> > ---
>
> Hey, Tomi. Your '---' separator is in the wrong place! You wrote this
> nice long log message, but it won't be attached to the commit because
> it's below the body separator.
That was intentional. But, now that I think of it -- although that
is RFC patch, and not intented to be committed as such, I should
have written a little better commit message -- for people who
actually commit these messages before review.
>
> jamie.
Tomi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-16 17:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 16:11 [RFC PATCH] nmbug help w/o perldoc Tomi Ollila
2011-11-16 17:44 ` Jameson Graef Rollins
2011-11-16 17:49 ` Tomi Ollila
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).