Apparently Dist::Zilla is the "new shiny" for creating and releasing distributions... and I got a "WHAT? You're still using Module::Starter???" question... so I'm creating a Dist::Zilla::BeLike::CSJEWELL for myself (and anybody else that wants to use it) that includes both a profile for creating a new distribution (I got the idea from http://www.dagolden.com/index.php/955/creating-new-distributions-with-distzilla/ ), a PluginBundle, and a few Plugins, as well as a few other things to support those 3 things.

The repository is at http://bitbucket.org/csjewell/dist-zilla-belike-csjewell - it's still a work in progress. The creation half is pretty much done, the release half is not. (I still need to get an "upload to my own non-cpan web site" plugin done, and a "commit tarball to svn directory" plugin done, as well.)
http://perl5.git.perl.org/perl.git/blob/d069c0939011465ebb38fe3c8ba2bf2164f7ae17:/Porting/epigraphs.pod#l25

"For those who go in quest of the sepulchre, faith is bridge enough."

I hope I can pick better if I ever release-manage a 5.13! Certainly applies to us Perl people sometimes.

(Edit: Should have make it clear that I say that because I LIKE it, not because I don't.)

5.13.1 is finally out. I won't worry about 5.13.x very much until x gets to 9 or so (because then we're close to a 5.14, which I want to verify early will work for Strawberry.)
The C++ version of the relocation code looks like it's FINALLY starting to shine.

So I'll probably be releasing Beta 1 early this next week.

As for what mst's talk should be, I'd like to see him turn blue in the face... *grin*

So my proposed title is "Why Module::Build is better for installing your CPAN distributions than ExtUtils::MakeMaker".

And I like the idea of having his hair orange - it IS the official color of this blog, after all. (although I do have to admit the idea of seeing him do a Kojak haircut is funny, too.)

http://shadowcat.co.uk/blog/matt-s-trout/iron-man-lost?colour=pink&title=Why+Module::Build+is+better+for+installing+your+CPAN+distributions+than+ExtUtils::MakeMaker
Well, on http://use.perl.org/~Alias/journal/40184, Alias described how we shrunk the Strawberry Perl .msi files by ordering which files went into the databases, and suggested an Archive::Tar::Optimize. Let's see if that's actually worth doing.

Script:
#!perl

use 5.012;
use warnings;
use Archive::Tar qw();
use File::Find::Rule qw();
use File::Spec::Functions qw(updir rel2abs abs2rel catdir catfile splitpath);
use File::pushd qw(pushd);
use IO::Compress::Bzip2 qw(bzip2);
use IO::Compress::Xz qw(xz);
use IO::Compress::Gzip qw(gzip);

# This script assumes an unpacked perl distribution here.
my $PERLDIST  = 'L:\\perl\\perl-5.12.1';
my $ROOTDIR   = rel2abs(catdir($PERLDIST, updir()));
my $DISTDIR   = abs2rel($PERLDIST, $ROOTDIR);
my $TESTDIR   = 'C:\\Users\\Curtis\\Desktop\\tartest';
my $DUMB_TAR  = catfile($TESTDIR, $DISTDIR . '-dumb.tar');
my $SMART_TAR = catfile($TESTDIR, $DISTDIR . '-smart.tar');

sub compare {
	my ($a, $b) = @_;

	my (undef, $a_dir, $a_file) = splitpath($a);
	my (undef, $b_dir, $b_file) = splitpath($b);
	
	my ($a_ext) = split /[.]/, scalar reverse $a_file;
	my ($b_ext) = split /[.]/, scalar reverse $b_file;
	
	$a_ext //= q{};
	$b_ext //= q{};
	
	if ($a_ext ne $b_ext) {
		return $a_ext cmp $b_ext;
	} elsif ($a_dir ne $b_dir) { 
		return $a_dir cmp $b_dir;
	} elsif ($a_file ne $b_file) { 
		return $a_file cmp $b_file;
	} else { 
		return $a cmp $b;
	}
}

say "Starting test.";

my @filelist = File::Find::Rule->file()->relative()->in($PERLDIST);

my @filelist_dumb = map { catfile($DISTDIR, $_) } @filelist;
my @filelist_smart = sort { compare($a, $b) } @filelist_dumb;	

{ # Give File::pushd a scope.
	my $pushd = File::pushd::pushd($ROOTDIR);

	say "Making $DUMB_TAR.";
	my $dumb_tar = Archive::Tar->new();
	$dumb_tar->add_files(@filelist_dumb);
	$dumb_tar->write($DUMB_TAR);

	say "Making $SMART_TAR.";
	my $smart_tar = Archive::Tar->new();
	foreach my $file (@filelist_smart) {
#		say $file;
		$smart_tar->add_files($file);
	}
	$smart_tar->write($SMART_TAR);
}

print "\n";

say "Compressing $DUMB_TAR with gzip.";
gzip $DUMB_TAR  => $DUMB_TAR  . '.gz', -Level => 9, BinModeIn => 1;

say "Compressing $SMART_TAR with gzip.";
gzip $SMART_TAR => $SMART_TAR . '.gz', -Level => 9, BinModeIn => 1;

say "Compressing $DUMB_TAR with bzip2.";
bzip2 $DUMB_TAR  => $DUMB_TAR  . '.bz2', BlockSize100K => 9, BinModeIn => 1, WorkFactor => 250;

say "Compressing $SMART_TAR with bzip2.";
bzip2 $SMART_TAR => $SMART_TAR . '.bz2', BlockSize100K => 9, BinModeIn => 1, WorkFactor => 250;

say "Compressing $DUMB_TAR with xz.";
xz $DUMB_TAR  => $DUMB_TAR  . '.xz', Preset => 9, BinModeIn => 1;

say "Compressing $SMART_TAR with xz.";
xz $SMART_TAR => $SMART_TAR . '.xz', Preset => 9, BinModeIn => 1;
print "\n";

my $dumb_tar_gz_size  = -s $DUMB_TAR  . '.gz';
my $smart_tar_gz_size = -s $SMART_TAR . '.gz';
my $difference_gz = $dumb_tar_gz_size - $smart_tar_gz_size;
my $percent_gz = ($difference_gz / $dumb_tar_gz_size) * 100;
my $diff_gz_k = $difference_gz / 1024;

say "$DUMB_TAR.gz  size: $dumb_tar_gz_size ";
say "$SMART_TAR.gz size: $smart_tar_gz_size";
say "difference: $difference_gz ($percent_gz %) ($diff_gz_k KiB)";
print "\n";

my $dumb_tar_bz2_size  = -s $DUMB_TAR  . '.bz2';
my $smart_tar_bz2_size = -s $SMART_TAR . '.bz2';
my $difference_bz2 = $dumb_tar_bz2_size - $smart_tar_bz2_size;
my $percent_bz2 = ($difference_bz2 / $dumb_tar_bz2_size) * 100;
my $diff_bz2_k = $difference_bz2 / 1024;

say "$DUMB_TAR.bz2  size: $dumb_tar_bz2_size ";
say "$SMART_TAR.bz2 size: $smart_tar_bz2_size";
say "difference: $difference_bz2 ($percent_bz2 %) ($diff_bz2_k KiB)";
print "\n";

my $dumb_tar_xz_size  = -s $DUMB_TAR  . '.xz';
my $smart_tar_xz_size = -s $SMART_TAR . '.xz';
my $difference_xz = $dumb_tar_xz_size - $smart_tar_xz_size;
my $percent_xz = ($difference_xz / $dumb_tar_xz_size) * 100;
my $diff_xz_k = $difference_xz / 1024;

say "$DUMB_TAR.xz  size: $dumb_tar_xz_size ";
say "$SMART_TAR.xz size: $smart_tar_xz_size";
say "difference: $difference_xz ($percent_xz %) ($diff_xz_k KiB)";

exit;


Output:
Starting test.
Making C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar.
Making C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar.

Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar with gzip.
Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar with gzip.
Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar with bzip2.
Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar with bzip2.
Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar with xz.
Compressing C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar with xz.

C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar.gz  size: 14885143
C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar.gz size: 14892370
difference: -7227 (-0.0485517673562155 %) (-7.0576171875 KiB)

C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar.bz2  size: 12011773
C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar.bz2 size: 12073770
difference: -61997 (-0.516135294931065 %) (-60.5439453125 KiB)

C:\Users\Curtis\Desktop\tartest\perl-5.12.1-dumb.tar.xz  size: 9280004
C:\Users\Curtis\Desktop\tartest\perl-5.12.1-smart.tar.xz size: 9260888
difference: 19116 (0.205991290520995 %) (18.66796875 KiB)


So in the case of the Perl source code, trying to optimize the .tar file by trying to group files with similar extensions together (as an attempt to optimize for similar content) doesn't do enough to worry about in the .xz case, and makes a file that compresses WORSE for .gz and .bz2.

And just as an aside, the .tar files are exactly the same size.

(speaking of which, .xz is obviously optimized for decompression. It took about 90 seconds to compress each file, while .bz2 and .gz take 15 seconds each.)

Of course, your mileage may vary, based on your own test data.

Should actually try with an extracted Strawberry Perl (in order to have more binary data) and see what happens.
Strawberry Perl 5.12.1 - where is it?

Well, this time around, it's not going to be that quick. I've tested 5.12.1, and it builds, but that's not the only thing that needs doing!

This time around, I'm working on a "bug fix" round - getting rid of the small nitpicks, with not much real new functionality. So right now, I'm doing that. I plan on taking a week or two to do the bug-fixing, and you can expect the first beta (which will include 5.12.1) out on June 1st, if not sooner.

That way, I hope that the "July 2009" release round can be out around the first of the month, instead of the last of the month.
The rebuild was done a few days back. 5.12.0.1 is now up.

Now I can concentrate on some documentation, and on Perl::Dist::Padre and the next version of Strawberry Perl.

But I needed a break for a few days, and my personal Perl code website at http://csjewell.comyr.com/perl/ had been sadly neglected.

Previously, I had used a script on my laptop (since lost - the script, not the laptop) that used Perl::Tidy to do the formatting. The problem was, Perl::Tidy made some ugly HTML, and it didn't support having some of the links point back at an internal site. I had to run like 20 different regexes in my script, and they were different for every distribution. (I ended up deciding to store them in a YAML file.) Tedious work.

So I wrote a utility module that did what I wanted it to - to format Pod and syntax highlight Perl code into (X)HTML, and to do it in the same .html file, and to allow both internal and external linking.

That module has been released to CPAN as Pod::Simple::XHTML::BlendedCode. The repository for it is at http://bitbucket.org/csjewell/pod-simple-xhtml-blendedcode - I wanted to experiment with Mercurial, and I think I like it! Less clumsy than Git as far as Windows support goes, too.

The syntax highlighting is done by passing code fragments to PPI::HTML, so it's described there.

The module should work on any operating system. The script I used to do the formatting, and 5 updated distributions, are now on the web site, and as I get around to it, I can process and upload a distribution in about 15-30 minutes. The only thing it doesn't do (yet) is create a fragment for the tree on the left side for me.

Updates.

Sep. 5th, 2009 05:27 am
The antlering has taken some debugging, but it's going through final tests now. (Last one crashed on a module it could not download - apparently internet connection blipped. I'm making sure I have the deps right in a VM, and then I'll try again.)

Then I have to WRITE tests. :( (Well, technically, I should write a Test::Perl::Dist module - and that's half-written at the moment - and then tests using it.)

That, and is there a place for the Ironman badges that automatically gives you the code to put on the page? (Oh. Found the URL for my own badge... that works.)

My Ironman Status

I did get good news - more later, I'm tired.
I happen to use Module::Starter and Module::Release for my automation - but of course, I don't do things quite the way the default configurations for those two modules want me to.

So I'm making my own plugins for future stuff.

They'll be on the way soon, the release plugins are on the other computer. :(

And for the first time, I actually get Git working enough to be comfortable with it, so I've uploaded MooseX::Error::Exception::Class to github. I'm pretty free with allowing changes - just send a pull request.

Profile

csjewell

June 2011

S M T W T F S
   1234
567891011
12131415161718
192021 22232425
2627282930  

Style Credit

Syndicate

RSS Atom
Page generated Oct. 23rd, 2014 11:41 am
Powered by Dreamwidth Studios

Expand Cut Tags

No cut tags

Most Popular Tags