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

Enable optional features for Perl code chunks #1699

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

kiwiroy
Copy link
Contributor

@kiwiroy kiwiroy commented Apr 3, 2019

This PR aims to enable optional features when running Perl code chunks.

From perlrun

  -E commandline
            behaves just like -e, except that it implicitly enables all optional features (in the main compilation unit). See feature.

Current behaviour

An attempt to use say, as in say "Hello, World!";, is met with the following error.

Error in engine(options) : 
  String found where operator expected at -e line 2, near "say "Hello, $user""
	(Do you need to predeclare say?)
syntax error at -e line 2, near "say "Hello, $user""
Execution of -e aborted due to compilation errors.
Calls: <Anonymous> ... process_group.block -> call_block -> block_exec -> in_dir -> engine

Copy link
Owner

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I don't know much about Perl, so I'll just trust you.

BTW, could you add an item in NEWS.md to mention this change?

@kiwiroy
Copy link
Contributor Author

kiwiroy commented Apr 3, 2019

Awesome. NEWS.md updated. Thanks.

Copy link
Owner

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Thanks!

@yihui yihui added this to the v1.23 milestone Apr 3, 2019
@yihui yihui merged commit 6103edd into yihui:master Apr 3, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants