Szabo Gabor approached me the other day and asked if he could use
HTML::Template for something he was doing. I said "sure", but at the
same time I regretted that every such copying is essentially a branch.
Branching is good, but only for the right reasons. The fact that
there's no other way to re-use than to copy things to another
repository is not a good reason.
On the other hand, if we were to be maximally prudent and keep all
distinct modules in distinct repositories (say, on github), we'd have
another problem: administration. It would take a lot of time and
effort to install a module and all its dependencies, and all their
dependencies, and so on.
Yesterday I set out to solve that problem. I'm not quite finished yet,
need a few more coding sessions, but things are looking really good.
Here's the background:
<http://irclog.perlgeek.de/perl6/2009-02-05#i_887491>
<http://irclog.perlgeek.de/perl6/2009-02-06#i_888839>
Here's the github repository:
<http://github.com/masak/proto/>
Especially check the README file for now.
I could provide more examples of modules that would benefit from
moving out from the November repo, but my writing time just ran out.
Please reply with comments, questions and criticisms.
// Carl
actually for now I am only running it on my development machine so my
code starts with
BEGIN {
@*INC.push('/home/gabor/work/november/p6w/',
'/home/gabor/work/szabgab/trunk/Perl6-Conf/lib/');
}
I did not have time to look at proto so maybe the following is totally
unnecessary but let me waste a few bytes here.
I thought for the time being all the Perl 6 modules could be under the
Perl6:: namespace and we could reuse CPAN for distribution.
I think it would not be difficult to customize Makefile.PL to run the tests
using $ENV{PARROT_DIR}/parrot $ENV{PARROT_DIR}/languages/rakudo/perl6.pbc
and the users could setup a PERL6LIB environment variable to point
to the @INC of their installed Perl 5, assuming there is such thing in Perl 6
and that Rakudo already supports it.
regards
Gabor
Yes, that works well for local code.
> I did not have time to look at proto so maybe the following is totally
> unnecessary but let me waste a few bytes here.
>
> I thought for the time being all the Perl 6 modules could be under the
> Perl6:: namespace and we could reuse CPAN for distribution.
I guess Perl 6 code can be placed anywhere on CPAN, in fact. The
Perl6:: namespace, last time I looked, contained a lot of modules
written in Perl 5, emulating Perl 6 behaviour as of a few years ago.
I do not wish to replace CPAN. I think that ultimately, CPAN is a much
better and more stable packaging/distribution/building mechanism than
proto. The only thing issue that I want proto to solve is the
immediate one where several Perl 6 projects reside on github, and
sometimes have dependencies.
> I think it would not be difficult to customize Makefile.PL to run the tests
> using $ENV{PARROT_DIR}/parrot $ENV{PARROT_DIR}/languages/rakudo/perl6.pbc
> and the users could setup a PERL6LIB environment variable to point
> to the @INC of their installed Perl 5, assuming there is such thing in Perl 6
> and that Rakudo already supports it.
Yes, there's a PERL6LIB in Rakudo. I'd be very pleased to see a
proof-of-concept of what you describe. Being able to publish things
like November to CPAN would be a great thing.
// Carl
>> I did not have time to look at proto so maybe the following is totally
>> unnecessary but let me waste a few bytes here.
>>
>> I thought for the time being all the Perl 6 modules could be under the
>> Perl6:: namespace and we could reuse CPAN for distribution.
>
> I guess Perl 6 code can be placed anywhere on CPAN, in fact. The
> Perl6:: namespace, last time I looked, contained a lot of modules
> written in Perl 5, emulating Perl 6 behaviour as of a few years ago.
>
> I do not wish to replace CPAN. I think that ultimately, CPAN is a much
> better and more stable packaging/distribution/building mechanism than
> proto. The only thing issue that I want proto to solve is the
> immediate one where several Perl 6 projects reside on github, and
> sometimes have dependencies.
Oh in the end someone will have to replace the whole CPAN in order
to support much better integration with the rest of the world.
Interestingly Andy Lester just opened a discussion about this on PerlBuzz.
Yeah I know there are some Perl 5 packages in the Perl6::namespace and
in general you are right that any namespace could be used for Perl 6 as well.
I was suggesting Perl6:: only as a temporary solution to reduce confusion
so HTML::Template could be renamed Perl:6::HTML::Template or
P6::HTML::Template but of course November, being so unique should stay November.
>> I think it would not be difficult to customize Makefile.PL to run the tests
>> using $ENV{PARROT_DIR}/parrot $ENV{PARROT_DIR}/languages/rakudo/perl6.pbc
>> and the users could setup a PERL6LIB environment variable to point
>> to the @INC of their installed Perl 5, assuming there is such thing in Perl 6
>> and that Rakudo already supports it.
>
> Yes, there's a PERL6LIB in Rakudo. I'd be very pleased to see a
> proof-of-concept of what you describe. Being able to publish things
> like November to CPAN would be a great thing.
So Perl6::Conf is on CPAN. I wrote about it on use.perl and a bit more
on my blog:
http://use.perl.org/~gabor/journal/38428
http://szabgab.com/blog/2009/02/1234081459.html
It still needs some work, but I think it is a good start.
regards
Gabor
I'm fairly uncomfortable with putting version information in the names
of modules. That sounds like an idea that we might grow to regret
really quickly. Also, I fail to see when confusion would arise between
Perl 5 and Perl 6 modules. In the best of worlds, Perl 6 modules
simply don't install on your system if you don't have Perl 6
installed, and they tell you so.
// Carl
<http://github.com/masak/html-template/>
To get November to build, you now need to do this:
* Get november. <http://github.com/viklund/november/>
* Get html-template. <http://github.com/masak/html-template/>
* Set PERL6LIB to point to the lib/ directory in the html-template project.
* Build html-template. (perl Makefile.PL; make)
* Set PERL6LIB to point to the lib/ directories in both the
html-template and november projects.
* Build november. (perl Makefile.PL; make)
That's six steps. If you prefer two steps, you could use proto instead:
* Get proto. <https://github.com/masak/proto/>
* Do './proto install november'
Proto will download and build Parrot, Rakudo, html-template and
november as needed and in an order which makes sense.
I'm currently working on making './proto update' work; after that, it
should be feasible for November developers to push back to github with
the latter installation method.
// Carl