Skip to content

Add support to hook into require #34

@Papipo

Description

@Papipo

Hi!

I have this app in which users can provide their lua scripts. I don't have those in the filesystem so I need to intercept require calls somehow (I will be returning them from the database or as chunks from ETS).

An option is to override require itself, but I think that adding a searcher after the preload one is more lua-esque.

In case it's better to just override require, how would yo approach returning preloaded modules?
Basically I don't know if luerl provides a mechanism to hook into require and if we can wrap it in this lib.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions