{ ________________________________
"meta-spec" : "1", | (not sure if CUR needs to know meta-spec version)
"perl" : "6.c", | ------------
__ | |
"name" : "Foo", | | |
__ | | |
| "auth" : "me@cpan.org", |_______ Distribution DepSpec |
This file contains 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
#!/usr/bin/env perl6 | |
use v6; | |
use Cro::HTTP::Server; | |
use Cro::HTTP::Router; | |
use Cro::HTTP::BodyParser; | |
# View all available distributions | |
# curl http://localhost:3000/installed |
This file contains 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
#!/usr/bin/env perl6 | |
use v6; | |
use Cro::HTTP::Server; | |
use Cro::HTTP::Router; | |
use Cro::HTTP::BodyParser; | |
# Create a new resource | |
# curl --verbose -H "Content-Type: application/json" -X POST -d '{ "foo" : "123" }' http://localhost:3000/resource |
This file contains 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
#!/usr/bin/env perl6 | |
use v6; | |
use IRC::Client; | |
use Cro::HTTP::Server; | |
use Cro::HTTP::Router; | |
use Cro::HTTP::BodyParser; | |
# Add the following section to an appveyor.yml | |
# |
This file contains 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
$ git diff | |
diff --git a/src/QRegex/Cursor.nqp b/src/QRegex/Cursor.nqp | |
index b10804c9f..767d79f3c 100644 | |
--- a/src/QRegex/Cursor.nqp | |
+++ b/src/QRegex/Cursor.nqp | |
@@ -87,11 +87,11 @@ role NQPMatchRole is export { | |
method to() { $!to < 0 ?? $!pos !! $!to } | |
method CURSOR() { self } | |
method PRECURSOR() { self."!cursor_init"(nqp::getattr($!shared, ParseShared, '$!target'), :p($!from)) } | |
- method Str() { $!pos >= $!from ?? nqp::substr(nqp::getattr($!shared, ParseShared, '$!target'), $!from, nqp::sub_i(self.to, $!from)) !! '' } |
This file contains 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
proto method candidates(|) {*} | |
multi method candidates(Str:D $name, :$auth, :$ver, :$api) { | |
return samewith(CompUnit::DependencySpecification.new( | |
short-name => $name, | |
auth-matcher => $auth // True, | |
version-matcher => $ver // True, | |
api-matcher => $api // True, | |
)); | |
} | |
multi method candidates(CompUnit::DependencySpecification $spec) { |
This file contains 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
unit module Zef::Utils::Distribution; | |
my grammar DepSpec::Grammar { | |
regex TOP { ^^ <name> [':' <key> <value>]* $$ } | |
regex name { <-restricted +name-sep>+ } | |
token key { <-restricted>+ } | |
token value { '<' ~ '>' [<( [[ <!before \>|\\> . ]+]* % ['\\' . ] )>] } | |
token restricted { [':' | '<' | '>' | '(' | ')'] } |
This file contains 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
my grammar DepSpec::Grammar { | |
regex TOP { ^^ <name> [':' <key> <value>]* $$ } | |
regex name { <-restricted +name-sep>+ } | |
token key { <-restricted>+ } | |
token value { '<' ~ '>' [<( [[ <!before \>|\\> . ]+]* % ['\\' . ] )>] } | |
token restricted { [':' | '<' | '>' | '(' | ')'] } | |
token name-sep { < :: > } | |
} |
This file contains 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
use v6.c; | |
use Test; | |
grammar DepSpec::Grammar { | |
regex TOP { ^^ <name> [':' <key> <value>]* $$ } | |
regex name { <-restricted +name-sep>+ } | |
token key { <-restricted>+ } |
This file contains 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
$ perl6 -Ilib bin/zef -v --/test install Inline::Perl5 | |
===> Searching for: Inline::Perl5 | |
===> Found: Inline::Perl5:ver('0.26'):auth('github:niner') [via Zef::Repository::Ecosystems<cpan>] | |
===> Searching for missing dependencies: LibraryMake, File::Temp | |
===> Found dependencies: File::Temp [via Zef::Repository::Ecosystems<p6c>] | |
===> Found dependencies: LibraryMake:ver('1.0.0'):auth('github:retupmoca') [via Zef::Repository::LocalCache] | |
===> Searching for missing dependencies: Shell::Command, File::Directory::Tree | |
===> Found dependencies: Shell::Command, File::Directory::Tree:auth('labster') [via Zef::Repository::Ecosystems<p6c>] | |
===> Searching for missing dependencies: File::Which, File::Find | |
===> Found dependencies: File::Find:ver('0.1'), File::Which [via Zef::Repository::Ecosystems<p6c>] |