Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: poll ideas quest 2021

by eyepopslikeamosquito (Archbishop)
on Aug 18, 2021 at 00:33 UTC ( [id://11135910]=note: print w/replies, xml ) Need Help??


in reply to Re^2: poll ideas quest 2021
in thread poll ideas quest 2021

Yes, strongly agree with your point about the impossibility of performing a static parse of Perl. Very annoying. Thankfully, this has been fixed in Raku.

Years ago, I remember being in awe of adamk's tenacity in developing PPI after attending a few early talks at Sydney.pm -- sadly, that heroic effort may have burnt him out, at least he appears to have vanished from the Perl universe. And I almost fell off my chair when I first read about TheDamian's astonishing PPR regex wizardry. :)

See also: Re: Perl script compressor by haukex - which mentions Guacamole.

Replies are listed 'Best First'.
Re^4: poll ideas quest 2021
by haukex (Archbishop) on Aug 18, 2021 at 08:19 UTC
    Guacamole

    I think it's noteworthy that the goal of that module is not to be able to parse all of Perl, just the subset of "standard Perl". So for example, it doesn't allow -bareword, stringy eval, unquoted hash keys on the left of the fat comma, and several more, but not because of technical limitations of the parser, but for policy reasons. I've suggested that the technical and policy based restrictions be disentangled to allow for easier porting of codebases to a parseable Perl, but I'm currently not sure when or if that might happen.

    Of course also noteworthy is RPerl, which I believe implements its own parser.

      unquoted hash keys on the left of the fat comma

      That will rule out a lot of the Perl I read and pretty much all of the Perl I write. If that's a policy restriction rather than a technical one then I am at a loss to understand the reasoning behind it.


      🦛

        That will rule out a lot of the Perl I read and pretty much all of the Perl I write.

        Yes, same here, and I commented on that in the issue I linked to above and Sawyer responded here. It doesn't seem to be a technical limitation.

        Since I think it would be technically possible to parse something like my %hash = ( foo => -bar );, that also means that it would be possible to automatically transform that to my %hash = ( 'foo' => '-bar' );, for example if that's what the company coding standards happen to be. Update: However, the transformation requires a completely parseable Perl in the first place, which is what we don't have (yet).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135910]
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: (7)
As of 2024-04-18 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found