Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Magic q JAPH

by liz (Monsignor)
on Sep 28, 2003 at 08:52 UTC ( #294729=note: print w/replies, xml ) Need Help??

in reply to Magic q JAPH

Hmmm... I either get:
Invalid range "@-" in transliteration operator
Undefined subroutine &main::pnirt called
depending on the version of Perl I use.


Indeed, as davido points out, it works if you put it all on one line. And I was thinking a JAPH should work just like that. Without "little assembly required"?

Replies are listed 'Best First'.
Re: Re: Magic q JAPH
by davido (Archbishop) on Sep 28, 2003 at 09:08 UTC
    I had to paste the individual lines all onto one line before I could get it to run. Once you've done that, you can run it through B::Deparse to get an idea of where it's safe to insert line breaks. Too bad the OP didn't break it at safe spots rather than stress out over trying to keep it to 40 columns.

    But then again, it can be confusing getting used to the text entry box at first. It wraps at 58 characters, making it tricky, especially for new monks, to know what to do about long lines.

    UPDATE: The original post has been fixed. Well done!


    "If I had my life to do over again, I'd be a plumber." -- Albert Einstein

      No offense, but why are you cutting and pasting when they have that nice little link that says, "Download code"?

        Anonymous Monk said, No offense, but....

        No offense taken.

        What you are simply misunderstanding is that when first posted, this well-done JAPH was cut into about eight rows of 40 columns. Once downloaded with the Download Code option that you mentioned, one still had to cut-and-paste (or otherwise manipulate) those eight lines all onto one line before it would work, since the line-breaks in the original version of the post broke the JAPH.

        The problem in the original post has since been corrected, and now the "Download Code" link produces code that will actually run. (Kudos to the original poster for fixing the problem).


        "If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://294729]
[Corion]: choroba: Ooooh - I didn't think of that! I write my presentations as POD and if it "roughly" looks like Perl code, I should also syntax-check that...
[haukex]: Yes sorry I don't run them all the time, my POD tests are only run as author tests (and are excluded when I'm using Devel::Cover)
[Corion]: choroba: Hmm - no, I keep the snippets inline, but as my framework also has support for capturing output etc., maybe I should do the same...
[Corion]: haukex: Yes, that approach is sane, and it heals the fragility of Pod parsers in a nice way while still syntax-checking stuff
[choroba]: Unfortunately, none of it is online
[haukex]: I figured that POD tests make sense, but only as author tests
[choroba]: I mean, the slides are, but not the makefile with scripts to create them
[Corion]: haukex: I've only now arrived at that revelation ;)
[Corion]: choroba: I use spod5, which also has that support, and also implements its own kinda-make stuff
[haukex]: But that module I just linked to assumes that most verbatim blocks are runnable code, I have other modules where that's not the case, so there I just copy-and-paste the synopsis into the author tests...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-02-27 12:27 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.