-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
use Sq::Type; # import defaults
use Sq::Type {
import => [qw/t_run t_valid/], # exports single requested functions
into => 'Package',
as => {t_run => 'type_run'}, # exports single function under new name
sig => 1, # load default signature
sig => 'Sig::Whatever', # loads signature file once before exporting
prefix => 'type_', # another prefix
};
# same
use Sq::Type qw(t_run t_valid);
use Sq::Type {
import => [qw/t_run t_valid/],
}defining another signature opens up some questions. First of, a signature file should only be loaded once. What happens when multiple use Sq::Type are in your project with different signatures?
Then only the first one would be loaded.
A better approach. Don't add signatures to the original package. First load/import functions. Then add signatures to the imported functions in the target package. This way you can load/import a module with different signatures at different places. While this is a cool feature. This isn't so important at the moment.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request