TITLE ^

Parrot::DWIM - Parrot's confusing opcodes made easy.

SYNOPSIS ^

    .sub _main
    .include "DWIM.pir"
    print "The answer is\n"
    add $I0, 20, 23
    dec $I0
    print $I0
    print "\nsay's Parrot!\n"
    end
    .end

DESCRIPTION ^

The first time you run a program under include DWIM, the module replaces all the unsightly opcodes from your source file with the new DWIM comment: # DWIM and runs normally.

The code continues to work exactly as it did before, but now it looks like this:

    .sub _main
    .include "DWIM.pir"
       # DWIM  "The answer is\n"
       # DWIM  $I0, 20, 23
       # DWIM  $I0
       # DWIM  $I0
       # DWIM  "\nsay's Parrot!\n"
       # DWIM
    .end

DIAGNOSTICS ^

Can't open 'file' for reading

Can't open 'file' for writing

BUGS ^

Doesn't work for code like

    I0 = 1

Probably a lot more.

AUTHOR ^

Dami^WLeopold Toetsch (as if you couldn't guess)

COPYRIGHT ^

Copyright (C) 2003, The Perl Foundation.

This module is free software. It may be used, redistributed and/or modified under the same terms as Parrot.


parrot