Thank you for the clarification. That means that at the moment, most files
(i.e. the ones written in OO) will have a have errors without a BEGIN block
(i.e. the use of self).

As 'perl6 -c' being for now the *only* way to check the syntax of a code
file, the security concerns should not be easily disregarded. In the best
case, users will have to jump through loops to have the functionality
enabled 'at their own risk', in the worst case people will blame Perl 6 for
stupid/dangerous done to their environment while "reading a code file with
their editor".

I am just thinking out loud, but could a different restricted core binary
with only a subset of the code provide the necessary parsing capabilities?
An alternative could be external tools implementing the parsing/linting of
code (maybe something using DrForr's future Perl6::Tidy?), but in that case
we would risk to have something playing catch-up to new Perl 6 releases.


C.

On Fri, Aug 19, 2016 at 1:25 AM, Brandon Allbery via RT <
perl6-bugs-follo...@perl.org> wrote:

> On Thu, Aug 18, 2016 at 6:18 PM, Claudio <nx...@apt-get.be> wrote:
>
> > Taking Brandon's answer in considiration, does this mean that no perl6
> > code could be parsed as correct without (implicit) BEGIN blocks or that
> it
> > will only work in -let's say- 99% of the time (file without a begin
> block)?
>
>
> I did say "while this is less true for perl 6 code in the wild" --- in perl
> 5, disabling BEGIN blocks means losing all "use" directives. But for perl
> 6, you still have to worry about classes not being defined properly because
> their definitions are run (!) at compile time.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allber...@gmail.com
> ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
>

Reply via email to