Skip to content

Instantly share code, notes, and snippets.

«index-entry-%25*ENV» «Pod::FormattingCode.new(type => "X", meta => ["\%*ENV"], config => {}, contents => [])»
«index-entry-%25__» «Pod::FormattingCode.new(type => "X", meta => ["\%_"], config => {}, contents => [])»
«index-entry-accessor_methods» «Pod::FormattingCode.new(type => "X", meta => ["accessor methods"], config => {}, contents => [""])»
«index-entry-Addition_operator» «Pod::FormattingCode.new(type => "X", meta => [], config => {}, contents => ["Addition operator"])»
«index-entry-Admonitory_stub_operator» «Pod::FormattingCode.new(type => "X", meta => [], config => {}, contents => ["Admonitory stub operator"])»
«index-entry-All_junction_operator» «Pod::FormattingCode.new(type => "X", meta => [], config => {}, contents => ["All junction operator"])»
«index-entry-also_declarator-also» «Pod::FormattingCode.new(type => "X", meta => ["also declarator"], config => {}, contents => ["", Pod::FormattingCode.new(type => "C", meta => [""], config => {}, contents => ["also"]), ""])»
«index-entry-anonymouse_argume
class DefinedAlternationContainer {
has $.item;
has $.condition-was-defined;
}
multi sub infix:<?>(\a, \b -->DefinedAlternationContainer) is export {
with a { return DefinedAlternationContainer.new(item => b, condition-was-defined => True) }
DefinedAlternationContainer.new(item => Any, condition-was-defined => False)
}
diff --git a/lib/Debian/IndexParse/Grammar.pm b/lib/Debian/IndexParse/Grammar.pm
index 55d76f6..10d7f6b 100644
--- a/lib/Debian/IndexParse/Grammar.pm
+++ b/lib/Debian/IndexParse/Grammar.pm
@@ -12,7 +12,7 @@ grammar Debian::IndexParse::Grammar {
[ <emptyline>+ <paragraph> ]*
<emptyline>*
$
- { my @list = map { .made }, $/<paragraph>;
+ { my @list = map -> $p { $p.made }, $/<paragraph>;
# function to be wrapped:
sub square-root($x) { $x.sqrt }
&square-root.wrap(sub ($num) {
nextsame if $num >= 0;
1i * callwith(abs($num));
});
say square-root(4); # 2
say square-root(-4); # 0+2i
use v6;
# multi sub infix:<∘> (&f, &g --> Block) { (&f).count > 1 ?? -> |args { f |g |args } !! -> |args { f g |args } }
multi sub infix:<oo> (&f, &g --> Block) {
do if (&f).count > 1 {
do if (&g).count == 1 {
-> |args { f |(args>>.&g) }
}else{
-> |args { f |g |args }
use v6;
subset Pod::FormattingCode::Macro of Pod::FormattingCode where .type eq 'A';
subset Pod::FormattingCode::Bold of Pod::FormattingCode where .type eq 'B';
subset Pod::FormattingCode::Code of Pod::FormattingCode where .type eq 'C';
subset Pod::FormattingCode::Definition of Pod::FormattingCode where .type eq 'D';
subset Pod::FormattingCode::Entity of Pod::FormattingCode where .type eq 'E';
subset Pod::FormattingCode::File of Pod::FormattingCode where .type eq 'F';
subset Pod::FormattingCode::Italic of Pod::FormattingCode where .type eq 'I';
subset Pod::FormattingCode::Link of Pod::FormattingCode where .type eq 'L';
class Command {
has Str $.name;
method ACCEPTS(Any:D $other) {
return $other ~~ Str and $other ~~ $!name;
}
}
my $c = Command.new(name => 'foo');
say ('foo' ~~ $c); #outputs: True
- 2 new traps
- a few layout impovements, including a Debug button in the footer for those that want to help improve the docs (details in CONTRIBUTIMG.md)
- many new index entries, you may be able to find now what you where looking for before
- a few addition to the 5to6 section
- unspace is now in the docs
- filename mangling will allow other platform then *nix to host the site and allows indexing of tricky operators like //
- Mu, Any, Num, Cool got missing methods added
- a few broken Code examples where fixed
- we link now to the examples.perl6.org
- many more small changes and additions
This file has been truncated, but you can view the full file.
pod2onepage --threads=2 -v --source-path=./doc --exclude=404.pod6,/.git,/precompiled > html/perl6.xhtml
processed ./doc/HomePage.pod6 (cached)
processed ./doc/Language/5to6-nutshell.pod6 (cached)
processed ./doc/Language/5to6-perlfunc.pod6 (cached)
processed ./doc/Language/5to6-perlop.pod6 (cached)
processed ./doc/Language/5to6-perlsyn.pod6 (cached)
processed ./doc/Language/5to6-perlvar.pod6 (cached)
processed ./doc/Language/about.pod6 (cached)
processed ./doc/Language/classtut.pod6 (cached)
processed ./doc/Language/concurrency.pod6 (cached)
- additions to Traps
- additions to Tests
- additions to Concurrency and related classes
- interpolation and it's interaction with undefined values is explained now in Quoting Constructs
- many more additions to the search index
- a few missing methods where added
- a few examples got unbroken
- Pod::To:BigPage is now used to generate https://docs.perl6.org/perl6.xhtml what contains all hand written documents (and excludes anything under /routine/ and list). It is mean as a standalone document for offline viewing and printing (as far as printing HTML goes). In the future it may be used to generate diffs of the docs.