[Buffalo-pm] one liner
Kevin Eye
eye at buffalo.edu
Mon Jun 23 12:51:30 CDT 2003
Distribute at will:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psh
Type: application/octet-stream
Size: 3910 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/buffalo-pm/attachments/20030623/d6d8c6f7/psh.obj
-------------- next part --------------
Also, I could do a "lightning talk" on this. Maybe 10 or 15 minutes.
Certainly not an hour and a half. If it were that complex, it wouldn't
be worth using :-)
- Kevin
On Sunday, June 22, 2003, at 08:59 PM, Matt Beato wrote:
> Kevin,
>
> The "psh" utility sounds great. Is there any way I could get a copy of
> it? I have no desire to redistribute it, just utilize it for my
> personal use.
>
> Thanks!
>
> -- Matt
> --
> Matt Beato
>
> On Friday, June 20, 2003, at 03:37 PM, Kevin Eye wrote:
>
>>> one of my favorite perl command line utilities:
>>>
>>> perl -de 0
>>
>> Hang on there - that deserves far more than a passing mention. In
>> fact, I'd go so far as to say that this tiny line, which lets one
>> interactively enter and test code, is almost certainly the most
>> under-appreciated feature of the language.
>>
>> To clarify things, "perl -de 0" (aka. "perl -de0" or "perl -de 1")
>> will invoke the perl debugger on the very short program "0" (or "1",
>> or whatever). This alone is not very interesting, however, the perl
>> debugger is a full-fledged interactive perl interpreter, evaluating
>> anything you enter. It's extremely handy to test a couple lines of
>> code, or see how a built-in function or module will handle a certain
>> input. The debugger's "x" command is also very useful, as it will
>> print out the contents of any complex data structure (e.g. an object,
>> an array of hash refs, etc.).
>>
>> Not being able to leave well-enough alone, I've actually turned this
>> concept into an entire program I call "psh" (perl shell). It lets you
>> enter commands interactively just like the debugger, and uses
>> Data::Dumper to print the results. I can't live without it.
>>
>> I'd love to demo this concept and program at a future meeting if
>> there's time in our schedule. Let me know what you think.
>>
>> - Kevin
>>
>>
>> --
>> Kevin Eye
>> Web Applications Developer
>> Creative Services and Marketing
>> University at Buffalo
>> 330 Crofts Hall
>> Buffalo, NY 14260
>> eye at buffalo.edu
>> phone (716) 645-5000 x1435
>> fax (716) 645-3765
>>
>> _______________________________________________
>> Buffalo-pm mailing list
>> Buffalo-pm at mail.pm.org
>> http://mail.pm.org/mailman/listinfo/buffalo-pm
>>
>>
>>
--
Kevin Eye
Web Applications Developer
Creative Services and Marketing
University at Buffalo
330 Crofts Hall
Buffalo, NY 14260
eye at buffalo.edu
phone (716) 645-5000 x1435
fax (716) 645-3765
More information about the Buffalo-pm
mailing list