You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's good to see this library as a fork of Keyword::Simple as I am interested in using keyword in an expression rather than just at the head of a statement. But I see this library would always prepend to rest of the souce, while Keyword::Simple actually allows one to change rest of the source. For example, below demo code of Keyword::Simple would just print "foo", but how can you do the same thing with Keyword::Pluggable?
use 5.014;
use warnings;
packageFoo {
use Keyword::Simple;
subimport {
Keyword::Simple::define 'foo', sub {
my ($ref) = @_;
$$ref = q{say "foo"};
};
}
};
BEGIN { Foo->import; }
foo(1);
say"bar";
The text was updated successfully, but these errors were encountered:
Thanks for the feedback.
That functionality indeed first was inherited from Keyword::Simple, until in the process of simplification it was somehow phased away.
But now I'm committing it back because it wasn't intended to get rid of it.
I think the latest commit changed it, please test
It's good to see this library as a fork of Keyword::Simple as I am interested in using keyword in an expression rather than just at the head of a statement. But I see this library would always prepend to rest of the souce, while Keyword::Simple actually allows one to change rest of the source. For example, below demo code of Keyword::Simple would just print "foo", but how can you do the same thing with Keyword::Pluggable?
The text was updated successfully, but these errors were encountered: