Re: Recommended Perl 6 best practices?

2008-12-20 Thread Carl Mäsak
Maybe this counts as a best practice, or maybe it's more of a
"pattern". In a recent piece of code, I found a way to exploit code
blocks to act like "return statements with side effects". The
resulting code became very clean, so I decided to blog about the way
it works.

 

// Carl


Re: 6PAN Spec question

2008-12-20 Thread Mark Overmeer
* Timothy S. Nelson (wayl...@wayland.id.au) [081220 03:45]:
>   Btw, looks like I was wrong about the terminology of 
> CPAN6/6PAN/whatever.  See link below for details (the new Terminology 
> section).
> 
> http://svn.pugscode.org/pugs/docs/Perl6/Spec/S22-package-format.pod

I do not understand the relevance of ???A: just abstract away the
actual distribution mechanism.  FTP or CD is also not mentioned
as possible transporters, so why is that for CPAN6 important?

For ???B.  In the current set-up, you use CPAN.pm to download, and then
install.  The 'cpan' script is a wrapper around CPAN.pm.  CPAN.pm starts
the install tool.  A more convient structure would be to have an user
application (maybe the same 'cpan' script), which calls some download
backend to retreive the distribution and then calls the right install
tool per distribution.  I would say: ???B is "cpan-NG"
-- 
   MarkOv


   Mark Overmeer MScMARKOV Solutions
   m...@overmeer.net  soluti...@overmeer.net
http://Mark.Overmeer.net   http://solutions.overmeer.net




Re: Recommended Perl 6 best practices?

2008-12-20 Thread Brandon S. Allbery KF8NH

On 2008 Dec 20, at 13:39, Carl Mäsak wrote:

Maybe this counts as a best practice, or maybe it's more of a
"pattern". In a recent piece of code, I found a way to exploit code
blocks to act like "return statements with side effects". The
resulting code became very clean, so I decided to blog about the way
it works.



Hm, couldn't you also do that with a sub that explicitly throws a  
"return" exception to the caller Routine?


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH