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

use do rather than require to load a mojo application #2097

Merged
merged 1 commit into from
Aug 25, 2023

Commits on Aug 24, 2023

  1. use do rather than require to load a mojo application

    The return value of require is usually not a reasonable thing to rely
    on, aside from it being true. The first time requiring a file, it will
    return the value of the last statement in the file. The second time
    requiring a file, it will return a simple true value.
    
    Mojo was bypassing this problem by deleting the %INC entry for the file,
    forcing it to always be loaded again. But the new module_true core
    feature will cause require to always return a simple true value rather
    than the last statement in the file. This does not apply to do though.
    
    Switch to using do to be compatible with code using the new feature.
    haarg committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    693fc6c View commit details
    Browse the repository at this point in the history