Skip to content

Commit

Permalink
save work
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Jan 25, 2024
1 parent d078a50 commit 2e965f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for Mi6-Helper

{{$NEXT}}
- Fix issue #?: confused by mixed '::' and '-' hyphens in module name
- Add $HOME/.mi6-helper/config.json for customizations
such as:
+ t/testfile.suffix
Expand Down
12 changes: 7 additions & 5 deletions lib/Mi6/Helper.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ use Proc::Easier;
use File::Find;

has $.parent-dir = '.';
has $.module-name; #= as known to Zef, e.g., 'Foo::Bar::Baz'
has $.module-name; #= as known to Zef, e.g., 'Foo::Bar-Baz'
has $.module-base; #= as known to git, e.g., 'Foo-Bar-Baz'
# libs are determined by the '::' separators in the module name
has @.libdirs is rw; #= 'lib/Foo/Bar/Baz.rakumod'
has @.libdirs is rw; #= 'lib/Foo/Bar-Baz.rakumod'
#= 'lib
#= 'lib/Foo
#= 'lib/Foo/Bar
has $.libfile is rw; #= 'lib/Foo/Bar/Baz.rakumod;
has $.libfile is rw; #= 'lib/Foo/Bar-Baz.rakumod;

=begin comment
e.g., Foo-Baz::Bar
Expand All @@ -24,7 +23,10 @@ has $.mode is rw; #= "old" or "new"

submethod TWEAK {
return if not $!module-name.defined;
$!module-base = $!module-name;
my $module-base = $!module-name;
# separate the name by splitting on '::' only
my @parts = $module-base.split('::');

$!module-base ~~ s:g/'::'/-/;
}

Expand Down

0 comments on commit 2e965f1

Please sign in to comment.