Last active
January 1, 2025 22:01
-
-
Save ab5tract/5a647bff73e5fff276b3f1aec581c933 to your computer and use it in GitHub Desktop.
Fix for Cromponent PR#9 (maybe?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Cromponent.rakumod b/lib/Cromponent.rakumod | |
index 1bb5708..339046d 100644 | |
--- a/lib/Cromponent.rakumod | |
+++ b/lib/Cromponent.rakumod | |
@@ -234,8 +234,12 @@ sub cromponent-library($component) is export { | |
multi EXPORT(--> Map()) { | |
'&trait_mod:<is>' => &trait_mod:<is>, | |
- '&EXPORT' => sub { | |
- [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map | |
+ '&EXPORT' => sub { | |
+ BEGIN { | |
+ use Cro::WebApp::Template::Repository; | |
+ my $*TEMPLATE-REPOSITORY = get-template-repository; | |
+ [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map; | |
+ } | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Cromponent.rakumod b/lib/Cromponent.rakumod | |
index 1bb5708..62411c7 100644 | |
--- a/lib/Cromponent.rakumod | |
+++ b/lib/Cromponent.rakumod | |
@@ -234,8 +234,12 @@ sub cromponent-library($component) is export { | |
multi EXPORT(--> Map()) { | |
'&trait_mod:<is>' => &trait_mod:<is>, | |
- '&EXPORT' => sub { | |
- [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map | |
+ '&EXPORT' => sub { | |
+ my % will begin -> %m { | |
+ use Cro::WebApp::Template::Repository; | |
+ my $*TEMPLATE-REPOSITORY = get-template-repository; | |
+ %m = [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map; | |
+ } | |
}, | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Cromponent.rakumod b/lib/Cromponent.rakumod | |
index 1bb5708..668d2de 100644 | |
--- a/lib/Cromponent.rakumod | |
+++ b/lib/Cromponent.rakumod | |
@@ -234,8 +234,13 @@ sub cromponent-library($component) is export { | |
multi EXPORT(--> Map()) { | |
'&trait_mod:<is>' => &trait_mod:<is>, | |
- '&EXPORT' => sub { | |
- [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map | |
+ '&EXPORT' => sub { | |
+ my %export-map will begin -> %m { | |
+ use Cro::WebApp::Template::Repository; | |
+ my $*TEMPLATE-REPOSITORY = get-template-repository; | |
+ %m = [|@components-sub, |@components-macro].map({ |cromponent-library $_ }).Map; | |
+ } | |
+ %export-map | |
}, | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment