Richard Hainsworth wrote:
> One of Masak's irritations with perl6 
> (http://use.perl.org/~masak/journal/39334) concerns interspacing POD and 
> code.
> 
> I ran into an analogous problem with a project I am trying to do with 
> perl6. Since perl6 doesnt yet link to the gd library, and I need 
> graphical output, I use perl6 to compile a script for another utility 
> (in my case ploticus). The result is that I have code which looks a bit like
> 
>     perl6 code;
>     perl6 code;
>     $script.say("
> output code
> output code
> ");
>     perl6 code {
>        perl6 code
>        perl6 code
>        $script.say("
> output code
>     indented output code
>     indented output code
> ");
>     }
>     perl6 code
> 
> In other words, I have two languages intermixed, each with its own 
> indentation.
> 
> I would like to have the indentation of the output (or secondary 
> language) to be dependent on the primary languages indentation. As in 
> the comments to masak's blog, I use indentation to help me with 
> understanding the structure of my program (in perl6). When the output 
> language over-rides the indentation hierarchy in the primary language, I 
> loose the usefulness of indentation.
> 
> Thus I would like to be able to see:
> 
>     perl6 code;
>     perl6 code;
>     $script.say('
>         output code
>         output code
>     ');

Presumably you want here-docs, which can be indented in Perl 6:

    perl 6 code
    perl 6 code
    $script.say(Q:to<END>);
         output code
         output code
         END

The leading whitespace will be pruned from the string.

Cheers,
Moritz

Reply via email to