Skip to content

Commit 5aa7f9a

Browse files
committed
htmlify: Do not use deprecate methods
lizmat++ for making the deprecation mesages so awesome
1 parent cc756f6 commit 5aa7f9a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

htmlify.p6

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ sub MAIN(
145145
write-index-files;
146146

147147
say 'Writing per-routine files ...';
148-
for $*DR.lookup('routine', :by<kind>).uniq(:as{.name}) -> $d {
148+
for $*DR.lookup('routine', :by<kind>).unique(:as{.name}) -> $d {
149149
write-routine-file($d.name);
150150
print '.'
151151
}
152152
say '';
153153

154154
say 'Writing per-syntactic-feature files ...';
155-
for $*DR.lookup('syntax', :by<kind>).uniq(:as{.name}).list -> $d {
155+
for $*DR.lookup('syntax', :by<kind>).unique(:as{.name}).list -> $d {
156156
write-syntax-file($d.name);
157157
print '.'
158158
}
@@ -422,7 +422,7 @@ sub find-definitions (:$pod, :$origin, :$min-level = -1) {
422422
# Determine proper subkinds
423423
my Str @subkinds = first-code-block($chunk)\
424424
.match(:g, /:s ^ 'multi'? (sub|method)»/)\
425-
.>>[0]>>.Str.uniq;
425+
.>>[0]>>.Str.unique;
426426

427427
note "The subkinds of routine $created.name() in $origin.name() cannot be determined."
428428
unless @subkinds;
@@ -446,8 +446,8 @@ sub find-definitions (:$pod, :$origin, :$min-level = -1) {
446446

447447
sub write-type-graph-images(:$force) {
448448
unless $force {
449-
my $dest = 'html/images/type-graph-Any.svg'.path;
450-
if $dest.e && $dest.modified >= 'type-graph.txt'.path.modified {
449+
my $dest = 'html/images/type-graph-Any.svg'.IO;
450+
if $dest.e && $dest.modified >= 'type-graph.txt'.IO.modified {
451451
say "Not writing type graph images, it seems to be up-to-date";
452452
say "To force writing of type graph images, supply the --typegraph";
453453
say "option at the command line, or delete";
@@ -530,7 +530,7 @@ sub write-search-file () {
530530
@items.push: $*DR.lookup('type', :by<kind>).sort(*.name).map({
531531
qq[\{ label: "Type: {.name}", value: "{.name}", url: "{.url}" \}]
532532
});
533-
@items.push: $*DR.lookup('routine', :by<kind>).uniq(:as{.name}).sort(*.name).map({
533+
@items.push: $*DR.lookup('routine', :by<kind>).unique(:as{.name}).sort(*.name).map({
534534
do for .subkinds // 'Routine' -> $subkind {
535535
qq[\{ label: "{ $subkind.tclc }: {escape .name}", value: "{escape .name}", url: "{.url}" \}]
536536
}
@@ -639,7 +639,7 @@ sub write-main-index(:$kind, :&summary = {Nil}) {
639639
pod-table($*DR.lookup($kind, :by<kind>)\
640640
.categorize(*.name).sort(*.key)>>.value\
641641
.map({[
642-
.map({.subkinds // Nil}).uniq.join(', '),
642+
.map({.subkinds // Nil}).unique.join(', '),
643643
pod-link(.[0].name, .[0].url),
644644
.&summary
645645
]})
@@ -656,7 +656,7 @@ sub write-sub-index(:$kind, :$category, :&summary = {Nil}) {
656656
.grep({$category .categories})\ # XXX
657657
.categorize(*.name).sort(*.key)>>.value\
658658
.map({[
659-
.map({.subkinds // Nil}).uniq.join(', '),
659+
.map({.subkinds // Nil}).unique.join(', '),
660660
pod-link(.[0].name, .[0].url),
661661
.&summary
662662
]})

0 commit comments

Comments
 (0)