Krzysiek has asked for the wisdom of the Perl Monks concerning the following question:
Hi, monks.
I'm trying to rewrite rake, "build language" so it would fit within perl. If you don't know what is rake here you find all the info:
Rake project main page:
Rake syntax:
http://rake.rubyforge.org/files/doc/rakefile_rdoc.html
Rake tutorial:
http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial
In general it's a embedded domain specific language doing same things as the unix make util but it is using only ruby language
The source code of what I've done till this moment is available at
http://manta.univ.gda.pl/~ksuchoms/pake-final.tar.gz
You will find there:
pake - main app, definition of method available in Pakefile
try running:
./pake -T
./pake test3
./pake program
I would like to know if I there are any other perl syntax rules which I could use in the Pakefile (Pakefile is like Makefile). Right now creating dependencies looks like this:
desc "task simply prints test";
task {
print "test\n";
} "test";
task {
print "test1\n";
use Pod::Html;
} "test1" => "test";
desc "another boring description";
task {
print "test2\n";
} "test2"=> "test";
task{
print "test3\n";
} "test3" => "test2", "test1" ;
task method registers new task for example with the name test3 which depends on test2 and test1.
Secondly I would like to know how exactly the sort routine works. Because I don't understand how the $a $b variables are passed to the anonymous subroutine. I would like to create $task variable within the anonymous subroutine I'm passing to the task method.
I would like to know if you have some other idea how to create pure perl make tool.
Thanks, Krzysiek.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl - make tool
by ysth (Canon) on Aug 03, 2008 at 19:27 UTC | |
|
Re: Perl - make tool
by InfiniteSilence (Curate) on Aug 03, 2008 at 18:08 UTC | |
|
Re: Perl - make tool
by jethro (Monsignor) on Aug 03, 2008 at 17:58 UTC | |
|
Re: Perl - make tool
by eyepopslikeamosquito (Archbishop) on Aug 03, 2008 at 21:48 UTC | |
|
Re: Perl - make tool
by Burak (Chaplain) on Aug 03, 2008 at 18:09 UTC |