Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

[Perl6] Small discoveries I, __DATA__

by holli (Abbot)
on Sep 27, 2017 at 14:38 UTC ( [id://1200201]=perlmeditation: print w/replies, xml ) Need Help??

Perl6 knows no __DATA__ construct. One can however, use the =finish pod marker and the $=finish variable for similar effect.
use v6; say $=finish; # says "foo" =finish foo
Edit: Renamed as per advice


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re: Small Perl 6 discoveries I, __DATA__
by jahero (Pilgrim) on Sep 29, 2017 at 07:47 UTC

    I believe that might not be accurate. See this (disclaimer: untested) https://design.perl6.org/S26.html#Data_blocks

    Rats. Should have tried it first.

    ===SORRY!=== Error while compiling c:\temp/test.p6 Pod variable $=data not yet implemented. Sorry. at c:\temp/test.p6:8 ------> say $=data<HERE><Virtues>;

      It says right across the top of the page you linked:
      Note: these documents may be out of date. For Perl 6 documentation see docs.perl6.org; for specs, see the official test suite.
      I'm going to have to point out that docs.perl6.org is not always correct either, and let the significance of the last phrase sink in. The test suite is constantly tweaked to match the behavior of the latest perl6 code, so effectively the only specification for Perl6 is perl6 (caps intentional).
        The test suite is constantly tweaked to match the behavior of the latest perl6 code

        Are you including new tests that land corresponding to bug fixes that land? (Which is to say, most of the changes to the test suite.) Or just removals and corrections of bad tests?

          A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1200201]
Approved by haukex
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-16 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found