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

Fix relative path handling in templates on Perl 5.26+ with 'do' #79

Closed
wants to merge 1 commit into from

Conversation

xsawyerx
Copy link
Contributor

Instead of using a messy delete/eval+require construction, its simpler
just to use "do" which doesn't check %INC in the first place.

do + $@ semantics are the same as requires, and "do" was designed for
this sort of thing.

Additionally, this leads to be able to potentially check the value of
$!, which may be meaningful here.

Additionally, "didn't end with true" is no longer a failure condition
... this may or may not be a good thing.

NB: It doesn't seem like the value of "$compiled" is very useful in the
failure case, as the expectation is with require, that'd have been a
falsey value at best, or a literal "undef" at worst, yeilding additional
warnings.

Instead of using a messy delete/eval+require construction, its simpler
just to use "do" which doesn't check %INC in the first place.

do + $@ semantics are the same as requires, and "do" was designed for
this sort of thing.

Additionally, this leads to be able to potentially check the value of
$!, which may be meaningful here.

Additionally, "didn't end with true" is no longer a failure condition
... this may or may not be a good thing.

NB: It doesn't seem like the value of "$compiled" is very useful in the
failure case, as the expectation is with require, that'd have been a
falsey value at best, or a literal "undef" at worst, yeilding additional
warnings.
Copy link
Collaborator

@atoomic atoomic left a comment

Choose a reason for hiding this comment

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

this is an alternate solution to #80 using do instead of the traditional "delete INC + require"

@toddr
Copy link
Collaborator

toddr commented Oct 5, 2018

We're going to reject this PR over #80 as it's a behavior change. See #177 for further discussion

@toddr toddr closed this Oct 5, 2018
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

Successfully merging this pull request may close these issues.

None yet

4 participants