Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't parse helloworld #22

Closed
Azq2 opened this issue Jul 7, 2015 · 3 comments
Closed

Can't parse helloworld #22

Azq2 opened this issue Jul 7, 2015 · 3 comments

Comments

@Azq2
Copy link

Azq2 commented Jul 7, 2015

root@zhumarin /home/azq2/bots/spaces # rperl 1.pl
Can't parse code: Unknown error parsing Perl documentxujroot@zhumarin /home/azq2/bots/spaces # 
root@zhumarin /home/azq2/bots/spaces # cat 1.pl
print "xuj";
@wbraswell
Copy link
Owner

@Azq2
I'm very confused by the output you have provided here, it appears to show the rperl command producing the output which contains error message "Can't parse code: Unknown error parsing", however there is no such error message ever generated by RPerl! Is this a fake output you have created?

@bulk88
Copy link
Collaborator

bulk88 commented Jul 7, 2015

Here is the OP's error message, https://metacpan.org/source/MITHALDU/PPI-1.220/lib/PPI/Document.pm#L268

this is what I get on Win32 for that hello world script.

C:\sources>C:\sp3220\perl\site\bin\rperl  t.pl

ERROR ECVPAPC02, RPERL PARSER, PERL CRITIC VIOLATION
Failed Perl::Critic brutal review with the following message:

    Line number:  1
    Policy:       Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls
    Description:  Return value of flagged function ignored - print
    Explanation:  See Perl Best Practices page(s) 208, 278

    Line number:  1
    Policy:       Perl::Critic::Policy::Modules::RequireEndWithOne
    Description:  Module does not end with "1;"
    Explanation:  Must end with a recognizable true value

    Line number:  1
    Policy:       Perl::Critic::Policy::Modules::RequireExplicitPackage
    Description:  Code not contained in explicit package
    Explanation:  Violates encapsulation

    Line number:  1
    Policy:       Perl::Critic::Policy::Modules::RequireVersionVar
    Description:  No package-scoped "$VERSION" variable found
    Explanation:  See Perl Best Practices page(s) 404

    Line number:  1
    Policy:       Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict
    Description:  Code before strictures are enabled
    Explanation:  See Perl Best Practices page(s) 429

    Line number:  1
    Policy:       Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings
    Description:  Code before warnings are enabled
    Explanation:  See Perl Best Practices page(s) 431

    Line number:  1
    Policy:       Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolat
ionOfLiterals
    Description:  Useless interpolation of literal string
    Explanation:  See Perl Best Practices page(s) 51

xuj

@wbraswell
Copy link
Owner

Oh okay, I see, it was a PPI error message, not an RPerl error message.

The input code is not valid RPerl, please see the following link for a file which is valid RPerl and shows all valid uses of the 'print' operator.

https://github.com/wbraswell/rperl/blob/master/lib/RPerl/Test/OperatorVoid01Print/program_00_good.pl

Also, please note that RPerl currently supports *.pl programs as input files only in test mode perl -t foo.pl, valid RPerl classes only are currently supported in real compiler mode rperl Foo.pm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants