Re: CPAN question

2004-11-12 Thread Sean Quinlan
On Thu, 2004-11-11 at 10:20, Christopher Hicks wrote:
 On Wed, 10 Nov 2004, Sean Quinlan wrote:
  How do we mark uploads as a dev release? Can it be done after it's 
  uploaded or is it something in the release before upload that indicates 
  it (I browsed YAML .49_01 and didn't see anything)?
 
 The underscore in the filename is the flag.  (Its right there man!  :) )

LMAO! If it had been a snake...

Although maybe that should go into the PAUSE FAQ?

Thanks everyone!

-- 
Sean Quinlan [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: Getopt::Helpful - online help and options

2004-11-12 Thread khemir nadim
Hi, I haven't tested your code (will do this week-end) and I think it's a
good idea.

I already do what your module proposes to help with but I haven't had the
idea to make a module out of it.

my format looks like this:

my @flags_and_help =
 (
   'h|help'  = \$pbs_config-{DISPLAY_HELP}
   'Displays this help.',
  '',

 'hs|help_switch=s'= \$pbs_config-{DISPLAY_SWITCH_HELP},
  'Displays help for the given switch.',
  '' ,

 'c|colorize'  = \$PBS::Output::colorize,
  'Colorize output.',
  EOT ,
If Term::AnsiColor is installed on your system, use this switch to
colorize PBS output.

PBS has default colors but colorization is not turned on by default.

Colors can be defined through switches (try pbs -h | grep color) or

Check 'Term::AnsiColor' for more information.
EOT

So I have a short help which I use like this:
$ pbs -h | grep what_I_am_looking_for
which is very useful to remember some switch (I have well over 150 of those)

and a long help used like this:
$pbs -hs colorize

lately I have added, to the application,  a self search feature that extract
and display information embeded in pod.

I believe it would be good to let the users of you module define what , how
many types and how they want the help. So even my format is limiting.

You could still have some default values and types for the user that is
happy with what comes standard with the module.

Searching within the switch help is very usefull and should be supported.

I'll contribute a patch if you wish.

Cheers, Nadim.

Please CC me at [EMAIL PROTECTED] as I don't have news at home.




Re: Getopt::Helpful - online help and options

2004-11-12 Thread Eric Wilhelm
# The following was supposedly scribed by
# khemir nadim
# on Friday 12 November 2004 05:26 am:

lately I have added, to the application,  a self search feature that
 extract and display information embeded in pod.

There are already some modules designed to turn your pod into your 
options.  I opted not to go that route because pod lacks variables 
(see the previous discussions under not so plain documentation.)  
The primary goal here was to handle user-configurable options with 
reasonable defaults (so, of course the user should be able to see 
those defaults in the help message (and of course I don't want to 
duplicate information.))

I believe it would be good to let the users of you module define
 what , how many types and how they want the help. So even my format
 is limiting.

I'm more inclined to leave that up to 'app -h | less' or 'perldoc 
app'.  But, I guess it depends on how many options you have and how 
much help is included.

That said, I would like to find a way to integrate pod and help more 
closely.  However, I think at some point that the change has to 
happen in perldoc (say, for instance, a new type of paragraph which 
instructs perldoc to call the application with a certain flag 
($paragraph = `app --podhelp` or something.))  Currently, I have a 
section in my pods which elaborates on each option (there's a script 
kicking around here somewhere which does formats help into pod, but I 
don't like that approach because changes are a pain.)

You could still have some default values and types for the user that
 is happy with what comes standard with the module.

I'm not sure I'm following you here.  You want the help in multiple 
formats or multiple levels of verbosity?

Searching within the switch help is very usefull and should be
 supported.

So, --colorize is an option and 'pbs -hs colorize' shows only the help 
for that option?   Well, there is a usage() method in Getopt::Helpful 
that gets called when you include the '+help' builtin and don't 
define a main::usage().  I suppose it could check for leftovers in 
@ARGV and change behavior based on that.  Alternatively, there could 
be a '+helpsearch' builtin which calls a different method entirely.  
I'm more inclined to the first approach, so you would just do:

  app -h switchname

--Eric
-- 
It works better if you plug it in! 
--Sattinger's Law