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

Re: [MacPerl] awww Shucks



sean@misinc.net writes:
>That way, the script not only /contains/ its own documentation, but
>it'll also fling it at the user as needed.  So, toward that end, I
>started fiddling with code for a script to open itself in Shuck:

Cool idea!

>=head1 NAME
>
>Thang!!!!
>
>=cut
>
>use Mac::MoreFiles; # so's I can call FSpDTGetAPPL
>
>die "WHERE AM I????\n" unless -e $0 and -f _ and -r _;
>
>$shuck = FSpDTGetAPPL(scalar(&MacPerl::Volumes()), "\xb7uck"), "\n";

Hmm. Use

$shuck = $Application{"\xb7uck"};

instead. Your version only searches the startup volume.

>die "Where is Shuck??\n" unless $shuck and -e $shuck;

-x $shuck would be more precise.

>So I save this to disk, run, and it works admirably.  !!Except!! when I
>save it as a droplet, in which case it fails totally; it seems, not
>surprisingly, that Shuck looks only in the data fork for POD content,

Sigh. You're right.

>But I waaaaaaant it to be able to work for droooopleeeeets toooooo!

Understandable.

>So, I ask you all:  here are the solutions I can think of... what do
>you think of these alternatives, and can you think of others?
>
>Alternative 1: For some enterprising person who knows more about these
>things than me to make Shuck look for POD in TEXT resource #128 when
>fed a droplet (or, in fact, a CGI or runtime, since those too have
>their code in TEXT #128).
>In fact, I'm guessing only Murr can do this.

Right. I like the idea, so I'll do it.

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "And that's why I am going to turn this world upside down, and make
   of it a fire so *bright* that someone real will notice"
                                -- Vernor Vinge, _Tatja Grimm's World_

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch