Skip to content

Commit

Permalink
fix:Changed deprecated code for resources access.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Mar 27, 2024
1 parent c8bc7a5 commit 97cfb99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Data/Generators/ResourceAccess.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class Data::Generators::ResourceAccess {
#say "Number of calls to .make $numberOfMakeCalls";

#-----------------------------------------------------------
my $fileName = %?RESOURCES{'dfEnglishWords.csv'};
my $fileName = %?RESOURCES<dfEnglishWords.csv>;

my $text = slurp $fileName.Str;
my $text = slurp $fileName;
@englishWords = $text.split("\n").map({ $_.split(',') });
@englishWords = @englishWords[1..*-1];

Expand All @@ -70,9 +70,9 @@ class Data::Generators::ResourceAccess {

#-----------------------------------------------------------
# Species Name Count
$fileName = %?RESOURCES{'dfPetNameCounts.csv'};
$fileName = %?RESOURCES<dfPetNameCounts.csv>;

$text = slurp $fileName.Str;
$text = slurp $fileName;
my @petNames = $text.split("\n").map({ $_.split('",').List });
@petNames = @petNames[1..*-1];
@petNames = @petNames.grep({ $_.elems == 3 });
Expand Down

0 comments on commit 97cfb99

Please sign in to comment.