Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

sartak (7900)

sartak
  (email not shown publicly)
http://sartak.katron.org/
+ -

  Comment: Please do! (Score 1) on 2010.09.06 14:49

I really dislike this particular MI magic. Even for experts it can be a pain to guess what the right Module::Install plugin to install.
Read More 6 comments
Comments: 6
+ -

  Comment: Just as a point of history (Score 1) on 2010.04.08 11:15

Moose started this whole thing, not any $Adjective::Perl modules. Moose 0.10 (released 05 Jul 2006) turns on strict and warnings for you. Modern::Perl is circa 2009.

I think it was mst who came up with the trick.

Read More 26 comments
Comments: 26
+ -

  Comment: Re:VCS *does* matter (Score 1) on 2009.08.12 1:38

Another quick point I forgot to make: I have had comaint on Log::Dispatch for a month now, but I haven't touched the repository. I don't have any inclination to deal with a fifth version control system (Mercurial) for a single module. I'm sure I'm not alone in this laziness. :)
Read More 24 comments
Comments: 24
+ -

  Comment: VCS *does* matter (Score 1) on 2009.08.12 1:27

I used to version all of my modules with darcs. Other than patches from my friends who were already sold on darcs, I received only diffs against CPAN HEAD. Once I moved to git (and perhaps more importantly, github), I did begin receiving patches (many for Any::Moose, a few for App::Nopaste, etc). darcs was cited as a major barrier to entry because it required ghc (which has a notoriously long compilation time).

So in my experience, choice of VCS definitely impacts user contributions. Whether it matters significantly for git versus Subversion, I don't know. Both are pretty easy to install. Both have a lot of mindshare (and thus, documentation and support communities).

git has two advantages over Subversion for me. Its distributed nature is totally a win. Would you grant me a commit bit to your repository if you knew I was malicious? With a distributed VCS, that problem vanishes for you. But I'm still a first-class VCS citizen. I still get to use the VCS to commit atomically, revert commits, and anything else.

The other advantage is that git's tools totally beat Subversion's. Until recently, Subversion didn't even have good tools (except SVK) for merging. But git has all sorts of useful things like bisect, amend-commit, rebase -i, apply, cherry-pick, and (as alluded to earlier) github.

Read More 24 comments
Comments: 24
+ -

  Comment: SARTAK/Bot-Applebot-0.01.tar.gz (Score 1) on 2009.07.08 13:53

by sartak on 2009.07.08 13:53 (#69384)
Attached to: CPANDB Tricks: Tarballs that fail under Win32
I see I'm in the list here. Could you tell me how Bot-Applebot-0.01.tar.gz fails to extract under Windows so that I could fix it? Thanks!
Read More 5 comments
Comments: 5
+ -

  Comment: blogspot? (Score 1) on 2009.05.19 8:09

by sartak on 2009.05.19 8:09 (#68645)
Attached to: Leave use.perl?

I've been very happy with blogspot. They let you import (and export) posts and comments. You can pretend that the blog is hosted on your domain using a CNAME record (so that when blogger inevitably turns evil, my links to blog.sartak.org can be resuscitated).

They have all sorts of good little features. Most importantly: tags. I want to link to all of your role posts, but there's no easy way to do that without a tagging system. :)

Read More 19 comments
Comments: 19
+ -

  Comment: Re:On Warnings (Score 1) on 2009.04.25 8:24

by sartak on 2009.04.25 8:24 (#68305)
Attached to: Well, Now I Know (Roles)

You're actively discouraging people from taking advantage of allomorphism using well-established and long-recommended design techniques explicitly made safer and more understandable by roles.

I responded at my blog with a description of both sides of the argument. The gist of it is: the warning is gone, and we will support the warning Ovid needs (and much more) as Perl::Critic policies.

Read More 18 comments
Comments: 18
+ -

  Comment: Re:On Warnings (Score 1) on 2009.04.24 15:12

by sartak on 2009.04.24 15:12 (#68294)
Attached to: Well, Now I Know (Roles)

Imagine if Perl warned every time you slurp a file into an array. Sometimes that's a mistake -- perhaps often, it's a mistake. It's not always a mistake.

Imagine if Perl warned you every time you used a package-scoped variable only once. Sometimes that's a mistake -- perhaps often, it's a mistake. It's not always a mistake.

Imagine if Perl warned you every time you redefined a function (for example to memoize or inline it). Sometimes that's a mistake -- perhaps often, it's a mistake. It's not always a mistake.

Imagine if Perl warned you every time you recursively called a function more than 100 times.

Every time you used comma in a qw//.

Every time you leave an eval with next.

Every time you use @{ } or %{ } on a variable that happens to share a name with a builtin.

Every time you include some code directly after an exec call, so you can throw a proper error if the exec fails.

It's a wonder why anyone ever turns on these bothersome warnings. Some modules even have the gall to enable them for me without my explicit permission.

enable an optional warning

I encourage you to read this insightful blog post about why optional warnings are short-sighted. It is every bit as accurate when its subject is swapped for Moose.

* * *

Please don't take this the wrong way, chromatic. I respect you, your writing, and your contributions to free software. I just tire of this outrage over a warning whose purpose is to help users write more maintainable and clear code. "No surprises" is a laudable goal not only during release, but also between releases.

Read More 18 comments
Comments: 18
+ -

  Journal: bye on 2009.04.21 19:24

Journal by sartak on 2009.04.21 19:24

+ -

  Journal: Warnings are good, damnit! on 2009.04.14 19:28

Journal by sartak on 2009.04.14 19:28
User Journal

Warnings highlight possible bugs. The presence of a warning does not necessarily indicate a bug.

Only valid constructs will generate warnings! If a construct were invalid, then the system would have issued an error.

Warnings are not only for new learners. Warnings are also useful to experts, especially in the context of an evolving system. Delegating vigilance to the environment alleviates the burden of maintenance.

Read More 2 comments
Comments: 2
+ -

  Comment: Re:Mechanism vs Policy (Score 1) on 2009.04.14 14:12

by sartak on 2009.04.14 14:12 (#68121)
Attached to: Not All Features Are Useful (Moose Roles)

And here's the mailing list summary.

Read More 25 comments
Comments: 25
+ -

  Comment: -does a code smell? (Score 1) on 2009.04.06 13:12

by sartak on 2009.04.06 13:12 (#68034)
Attached to: Pondering Role Organization

I disagree with ->does being a code smell. I'll just let a slide from my recent Moose talk explain what I mean:

$creature = get_creature;

if ($creature->does('Role::Doglike')) {
    $creature->bark(at => $mailman);
}

Read More 1 comments
Comments: 1
+ -

  Comment: Re:Sys::Protect is too weak :( (Score 1) on 2009.03.25 22:18

by sartak on 2009.03.25 22:18 (#67917)
Attached to: Breaking Sys::Protect
Super cool. I also loved your pure-perl DB/inside-out hack. :)
Read More 2 comments
Comments: 2
+ -

  Journal: Breaking Sys::Protect on 2009.03.25 21:52

Journal by sartak on 2009.03.25 21:52
Bugs

Sys::Protect does not bill itself as unbreakable protection, but it's fun to break it anyway.

PadWalker is used as an example of an XS module that could seriously mess with other code.

#!/usr/bin/env perl
no strict;
use warnings;
use Sys::Protect;
use Test::More tests => 1;

XSLoader::load(bless {}, 'Break::Sys::Protect');

Read More 2 comments
Comments: 2
+ -

  Comment: sub new (Score 1) on 2009.01.29 18:41

by sartak on 2009.01.29 18:41 (#67113)
Attached to: Sixometer++
I think a default implementation for new would be a useful addition to class. How's this?

sub new {
    my $class = shift;
    my %args  = @_;

    return bless \%args, $class;
}

You could go further and implement something akin to Moose's BUILD, BUILDALL, and BUILDARGS.

Read More 1 comments
Comments: 1