Permalink
Browse files

Merge branch 'master' into pod-installing

  • Loading branch information...
2 parents de5092e + 39080b4 commit 44df6975fb925eb8e93a1376a6ccc401199565c5 @tadzik committed Aug 15, 2012
View
@@ -13,14 +13,14 @@ and Panda, being the actual module manager to use.
## Installation on Linux/UNIX/OSX
To install Panda along with all its dependencies, simply run the script
-bootstrap.sh in the root of the panda git repo. You must have a
-*perl6* binary in your $PATH for bootstrap.sh to work correctly.
+bootstrap.pl in the root of the panda git repo. You must have
+perl6 installed in order to run bootstrap.pl
git clone git://github.com/tadzik/panda.git
cd panda
- sh ./bootstrap.sh
+ perl6 bootstrap.pl
Since the bootstrap step currently runs tests with prove, you will need a
recent TAP::Harness (3.x) for it to work properly.
@@ -41,7 +41,7 @@ your path, you may now install Panda by doing:
cd panda
- bootstrap
+ perl6 bootstrap.pl
## Running Tests
View
3 bin/panda 100644 → 100755
@@ -69,7 +69,8 @@ my $panda;
$panda = Panda.new(
srcdir => "$pandadir/src",
- destdir => "$home/.perl6",
+ destdir => %*ENV<DESTDIR> ?? "{cwd}/%*ENV<DESTDIR>"
+ !! "$home/.perl6",
statefile => "$pandadir/state",
projectsfile => "$pandadir/projects.json"
);
View
@@ -1,4 +0,0 @@
-SET PERL6LIB=%CD%\ext;%CD%\lib
-perl6 bin\panda install File::Tools JSON::Tiny Test::Mock
-SET PERL6LIB=%CD%\lib
-perl6 bin\panda install panda
View
@@ -0,0 +1,33 @@
+use v6;
+
+my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;
+
+mkdir $home unless $home.IO.d;
+mkdir "$home/.panda" unless "$home/.panda".IO.d;
+my $projects = slurp 'projects.json.bootstrap';
+$projects ~~ s:g/_BASEDIR_/{cwd}\/ext/;
+given open "$home/.panda/projects.json", :w {
+ .say: $projects;
+ .close;
+}
+
+my $oldenv = %*ENV<PERL6LIB> // '';
+my $env_sep = $*VM<config><osname> eq 'MSWin32' ?? ';' !! ':';
+
+
+if %*ENV<DESTDIR> {
+ %*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/{%*ENV<DESTDIR>}/lib"
+}
+
+%*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/ext/File__Tools/lib";
+%*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/ext/JSON__Tiny/lib";
+%*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/ext/Test__Mock/lib";
+%*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/lib";
+
+shell "perl6 bin/panda install File::Tools JSON::Tiny Test::Mock";
+
+%*ENV<PERL6LIB> = join $env_sep, $oldenv, cwd() ~ '/lib';
+
+shell "perl6 bin/panda install .";
+
+unlink "$home/.panda/projects.json";
View
@@ -1,4 +0,0 @@
-#!/bin/sh
-PWD=`pwd`
-PERL6LIB=$PWD/ext:$PWD/lib perl6 bin/panda install File::Tools JSON::Tiny Test::Mock
-PERL6LIB=lib perl6 bin/panda install panda
View
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2010 Tadeusz Sośnierz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,7 @@
+{
+ "name" : "File::Tools",
+ "version" : "*",
+ "description" : "Various modules for file operations",
+ "depends" : [],
+ "source-url" : "git://github.com/tadzik/perl6-File-Tools.git"
+}
View
@@ -0,0 +1,5 @@
+This Perl 6 distribution contains the following modules:
+
+File::Copy
+File::Find
+File::Mkdir
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,35 @@
+use v6;
+use Test;
+use File::Find;
+plan 7;
+
+my $res = find(:dir<t/dir1>);
+my @test = $res.map({ .Str }).sort;
+is @test, <t/dir1/another_dir t/dir1/another_dir/empty_file t/dir1/file.bar t/dir1/file.foo t/dir1/foodir t/dir1/foodir/not_a_dir>, 'just a dir';
+
+# names
+
+$res = find(:dir<t/dir1>, :name(/foo/));
+@test = $res.map({ .Str }).sort;
+is @test, <t/dir1/file.foo t/dir1/foodir t/dir1/foodir/not_a_dir>, 'name with regex';
+
+$res = find(:dir<t/dir1>, :name<file.bar>);
+is $res.elems, 1, 'name with a string';
+
+$res = find(:dir<t/dir1>, :name<notexisting>);
+is $res.elems, 0, 'no results';
+
+# types
+
+$res = find(:dir<t/dir1>, :type<dir>);
+@test = $res.map({ .Str }).sort;
+is @test, <t/dir1/another_dir t/dir1/foodir>, 'types: dir';
+
+$res = find(:dir<t/dir1>, :type<dir>, :name(/foo/));
+@test = $res.map({ .Str }).sort;
+is @test, <t/dir1/foodir>, 'types: dir, combined with name';
+
+$res = find(:dir<t/dir1>, :type<file>, :name(/foo/));
+@test = $res.map({ .Str }).sort;
+is @test, <t/dir1/file.foo t/dir1/foodir/not_a_dir>,
+ 'types: file, combined with name';
@@ -0,0 +1,11 @@
+use v6;
+use Test;
+use Shell::Command;
+plan 2;
+
+mkpath 't/dupa/foo/bar';
+ok ('t/dupa/foo'.IO ~~ :d), 'mkpath, 1/2';
+ok ('t/dupa/foo/bar'.IO ~~ :d), 'mkpath, 1/2';
+rmdir 't/dupa/foo/bar';
+rmdir 't/dupa/foo';
+rmdir 't/dupa/';
No changes.
No changes.
No changes.
@@ -0,0 +1,3 @@
+foo foo
+asd
+foo bar
@@ -0,0 +1,3 @@
+*.swp
+Makefile
+*.pir
View
@@ -0,0 +1,12 @@
+lib/JSON/Tiny.pm
+lib/JSON/Tiny/Actions.pm
+lib/JSON/Tiny/Grammar.pm
+lib/Configure.pm
+t/04-roundtrip.t
+t/03-unicode.t
+t/01-parse.t
+t/02-structure.t
+META.yml
+Makfile.in
+README
+Configure
View
@@ -0,0 +1,8 @@
+{
+ "name" : "JSON::Tiny",
+ "version" : "*",
+ "description" : "A minimal JSON (de)serializer",
+ "depends" : [ ],
+ "source-url" : "git://github.com/moritz/json.git"
+}
+
View
@@ -0,0 +1,26 @@
+---
+name: JSON-Tiny
+version: '0.1.2_1'
+author:
+ - 'Moritz Lenz <moritz@faui2k3.org>'
+ - 'Johan Viklund <johan.viklund@gmail.com>'
+abstract: 'JSON parser and generator'
+license: artistic_2
+resources:
+ license: http://www.perlfoundation.org/artistic_2_0_notes
+distribution_type: module
+requires:
+ perl: 6.0
+provides:
+ JSON::Tiny:
+ file: lib/JSON/Tiny.pm
+ version: '0.1.2_1'
+ JSON::Tiny::Grammar:
+ file: lib/JSON/Tiny/Grammar.pm
+ JSON::Tiny::Actions:
+ file: lib/JSON/Tiny/Actions.pm
+generated_by: 'Moritz Lenz'
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+
View
@@ -0,0 +1,36 @@
+An initial Perl 6 grammar for JSON.
+
+This is a work in progress. For more information please join #perl6 on
+irc.freenode.net, and talk to moritz_ or viklund, or write a mail to
+perl6-users@perl.org.
+
+All files (unless noted otherwise) can be used, modified and redistributed
+under the terms of the Artistic License Version 2. Examples (in the
+documentation, in tests or distributed as separate files) can be considered
+public domain.
+
+To build and test this module, plese get 'ufo' from
+http://github.com/masak/ufo and run
+
+ ufo
+ make
+ make test
+
+(installation is not yet supported; you can do that manually by copying the .pm
+files from lib/ recursivley in your ~/.perl6/lib/ dir; installing .pir files
+is discouraged, since simple changes in Rakudo will render them worthless,
+might result in confusing errors).
+
+State:
+
+ The parser is pretty complete, if you find anything that it should
+ parse and doesn't, or the other way round, please let me know.
+
+ The emitter works.
+
+ Both currently ignore possible surrogate pairs.
+
+Credits
+ Moritz Lenz <moritz@faui2k3.org>
+ Johan Viklund
+ Jonathan Worthington
File renamed without changes.
File renamed without changes.
File renamed without changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 44df697

Please sign in to comment.