[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl help function



At 21.56 +0200 2000.07.13, Detlef Lindenthal wrote:
>1. How can I add new items (for example the words "hash", "list", "array",
>"regex" or "get") to be found by the MacPerl help function?
>2. Is there an editors team?
>3. And are there guide lines, that I already did violate with my wish of
>paragraph 1?

You can add anything you want.  The MacPerl Help file is a DBM.  Do this:

#!perl -w
use Data::Dumper;
use DB_File;
open FOO, "> $ENV{MACPERL}MacPerl Help Dump"
    or die "Can't open: $!";
tie %help, 'DB_File', "$ENV{MACPERL}MacPerl Help", O_RDONLY
    or die "Can't tie: $!";
print FOO Dumper \%help;

__END__

This shows you everything in the file, which is just a big hash.  You can
edit it like so:

#!perl -w
use DB_File;
tie %help, 'DB_File', "$ENV{MACPERL}MacPerl Help", O_RDONLY
    or die "Can't tie: $!";
$help{hash} = 'pod:pod/perldata.pod#Variable%20names';

__END__

So selecting "hash" in MacPerl Help will show you the section "Variable
names" of perldata.

I have a script that does some playing around with MacPerl Help.  It goes
through your pod and site_perl and lib directories, finding new POD to put
in links to.  I run it periodically so when I install new modules, I can
access them via the Help file.

    http://pudge.net/files/macperl/scripts/macperl_help_fill.plx

Make sure you back up your Help file before you edit it, in any case.  I
think my script backs it up for you.

-- 
Chris Nandor       |     pudge@pobox.com      |     http://pudge.net/
Andover.Net        | chris.nandor@andover.net | http://slashcode.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org