Click here to get back home

Make, Rake like tool in pure perl. I need feedback.

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Make, Rake like tool in pure perl. I need feedback. Krzysiek 07-05-2008
Posted by Krzysiek on July 5, 2008, 5:46 am
Please log in for more thread options
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:
http://rake.rubyforge.org/

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 utill but it is using only ruby language.

I'm not a perl expert and I would need some feedback from some more
experienced perl programmers.

The source code is available at http://manta.univ.gda.pl/~ksuchoms/pake.tar.gz
You will find there:
1) pake - main app, definition of method available in Pakefile
try running:
./pake -T
./pake test3
./pake program

2) Pakefile - the srcipt where you define dependencies
3) Pake - in this directory you will find all perl classes I'm using
in the pake.

First question goes to the language that should be exposed in Pakefile
(analogy to Makefile, Rakefile scripts)

In rake you would define task like this:

task :prereq1 do
# ruby code here
end

task :name => [:prereq1] do
# task name depends on prereq1 task, so if you run task name it
# will execute prereq1 first after that body of this task
end

In perl, by prototyping I've achieved smth like this:

task {
# task code here
} "test";

task {
# test1 task depends on test task
# test 1 task code here
} "test1" => ["test"];

Can I move the anonymous subroutine to the end of the task function
call, so that I would not be forced to write it like this:

task "test", sub {
# task code here
};

but like this:
task "test" {
# task code here
};
.


Another issue is more about perl idioms. I'm mainly programming java
so it's quite bizarre for me that if I bless hash variable to object I
have no option to block access to some variable (private modifier in
java).
What is the preffered style:
Creating set/get subroutines
using Autoload?
direct access through blessed variable
some other option?

I'm also interested what elements of rake language should be in the
perl version I'm writing out of the box. Namespaces? Adding some
specific tasks? Integration with some existing perl frameworks? Maybe
you are doing some things repeatedly and you would find it useful. I
will appreciate any feedback and opinions.


Similar ThreadsPosted
pure-perl access to mySQL June 14, 2005, 8:38 am
NameSpace for pure-perl TCP reassembly July 4, 2005, 1:54 pm
Need Perl/CGI Programmer for Shopping Cart/E-commerce Tool March 23, 2005, 2:36 pm
Requesting feedback on new module: Log::Any September 6, 2007, 6:49 pm
Request for feedback: proposed new modules to aid VHDL projects February 24, 2006, 9:49 am
Feedback requested on alternate interface to Time::Period March 8, 2007, 3:19 pm
mod_perl-1.99_16 won't make: don't know how to make dynamic September 1, 2004, 10:52 pm
perl SAP RFC SDK make problems in fedora December 2, 2005, 2:47 am
make test failing on Berkeley DB 4.5/perl 5.8 (and 5.6) on BSD6/AMD64 November 29, 2006, 4:44 pm
Archive::zip is how fast compared to the zip tool? October 10, 2005, 11:07 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap