user-pic

Mark A. Stratman

  • About: Perl developer, forever trapped in the DarkPAN
  • Commented on Ricardo is pushing for smart match changes.
    Very few Perl programmers actively follow p5p. So I'm glad to see major issues brought to the greater community through blogs or elsewhere. Having a decentralized conversation across a multitude of blogs, tweets, etc. doesn't help convey those wishes and...
  • Commented on Helping those who allow themselves to be helped
    I know this is a “well, duh!” response, but maybe it’s worth thinking about. In public internet exchanges (like on IRC, SO, mailing lists, etc) if I find myself annoyed, angered, or in any other negative state - I simply...
  • Commented on Perl traps for Ruby Programmers
    Personally I would stop after that first sentence, or not mention strings vs arrays altogether. When you tell Ruby programmers how to write Perl in a Ruby manner, they will... not surprisingly ... write Perl in a Ruby manner. If...
  • Commented on Exciting updates to MetaCPAN
    It's looking good, and I haven't had any performance hiccups with yet today. Good job, and thank you. :)...
  • Commented on When do you upgrade perl?
    As others have pointed out, there's definitely a difference in work vs. personal projects. My survey response was w.r.t. work. For personal use it's simply a matter of always grabbing the latest stable release....
  • Commented on Mojo ppl, what have you done?!
    Perl 5.10 has been around for almost 5 years. I think that's a reasonable timeframe for your hosting company to upgrade if they want to support modern Perl applications. 5.10(.1 especially) wasn't a minor or trivial release. It has a...
  • Posted RSS and Atom feeds in Catalyst to Mark A. Stratman

    The Catalyst cookbook provides two recommendations for adding RSS feeds to your application:

  • Create an XML template, populate the stash with data, let your template view re…
  • Commented on Can we afford bad code on blogs.perl.org?
    One of the biggest plagues on the Perl codebases of the world is the abundance of bad code, bad recommendations, and bad practices that are readily available at the top of every google search. I've seen it infect every codebase...
  • Commented on Syntax highlighting for search.cpan.org
    I agree that it should be default, and initially had it that way. But ultimately it was not my decision to make. So I'm just pushing for baby steps at the moment....
  • Commented on Syntax highlighting for search.cpan.org
    It is persistent. You set it once and forget it. :)...
  • Posted Syntax highlighting for search.cpan.org to Mark A. Stratman

    I also love syntax highlighti…

  • Commented on The coming bloated Perl apps?
    This is all about choosing the right tool for the right job. If Moose's startup costs are too much for a given task, it's the wrong tool. We all know this, of course.... But maybe this is a case for...
  • Commented on Does breaking encapsulation indicate the wrong type of hammer?
    I've said this elsewhere, but it's worth repeating: We need to keep in mind the differences between tutorials and reference materials. Tutorials are not for teaching the reader a solution to every possible scenario they might encounter. Rather, they're for...
  • Commented on Subclassing Tricky Non-Moose Classes: Constructor Problems
    j1n3l0, did you check out the first part of this tutorial (linked in the first paragraph) ? That's exactly the method I recommended and covered there. :) https://blogs.perl.org/users/mark_a_stratman/2011/03/subclassing-tricky-non-moose-classes-dont-do-it.html But perhaps this is a perfect indication that I didn't emphasize...
  • Commented on Subclassing Tricky Non-Moose Classes: Constructor Problems
    Thanks for the feedback. You make an excellent point. And while the focus of this tutorial is on the mechanics of inheritance through Moose, that's no excuse to use an inappropriate example. It's tricky though, because most anything can (and...
  • Posted Subclassing Tricky Non-Moose Classes: Constructor Problems to Mark A. Stratman
    We have a non-Moose class but want to make a Moose subclass of it. In the first post, "Subclassing Tricky Non-Moose Classes: Don't Do It", we looked at a way to extend non-Moos…
  • Commented on What should be core in Perl 5.16?
    I'd put in a vote for Config::Any and the various Config::* it supports, though I'll admit that's a gut-reactio and I haven't really thought it through. "Aristotle said somewhere recently..." I had this handy, if anyone is curious: http://www.nntp.perl.org/group/perl.perl5.porters/2011/02/msg169141.html...
  • Commented on Subclassing Tricky Non-Moose Classes: Don't Do It
    No - in fact this article as originally going to be about MooseX::NonMoose (and InsideOut)... until mst and doy convinced me that most of the people who want to subclass them SHOULDn't. So ... being a tutorial... i figured it...
  • Commented on Subclassing Tricky Non-Moose Classes: Don't Do It
    Thanks Mithaldu. I can definitely add some "why" to it. If you have some particular reasons you'd like to see, let me know. Otherwise for now I'll just add the main, practical reason (as opposed to for the sake of...
  • Posted Subclassing Tricky Non-Moose Classes: Don't Do It to Mark A. Stratman

    First, step back and consider if we really need a subclass.

    Don't subclass

    There are probably some good arguments against subclassing non-Moose classes with a Moose class that center on principles of goo…

  • Posted The Future of Perl Documentation (part 1 of 3) to Mark A. Stratman

    Perceived Extinction - Some context

    Perl is tired, old, crusty, and ready for the farm where its spirit can run free with the likes of COBOL and Fortran.

    Or at least that's what some people outside the community say.

  • Subscribe to feed Recent Actions from Mark A. Stratman

    • Toby Inkster commented on Ricardo is pushing for smart match changes.

      I think the case for dynamic scoping is being overstated. If I write a module along the lines of:

      package Answers;
      use smartmatch 'core';
      use Sub::Exporter -setup => {
        exports => [qw( is_affirmative is_negative )],
      };
      sub is_affirmative {
        lc( $_[0] ) ~~ qw( yes si oui );
      }
      sub is_negative {
        lc( $_[0] ) ~~ qw( no non );
      }
      1;
      

      The fact that is_affirmative and is_negative use smart match internally are just implementation details. Somebody who imports the functions into their namespace won't necessarily know that, so it would be pretty odd if…

    • Mark Stosberg commented on Ricardo is pushing for smart match changes.

      Richardo, thanks for the proposal, and Brian, thanks for highlighting an important issue for broader community input.

      Ricardo's proposal looked like a reasonable simplification to me.

      For some perspective, I was only able to recently get our production system upgraded from Perl 5.8 to Perl 5.14. We haven't even started to use smart matching in our code yet. I imagine a lot of people are in the same boat. There's no better time to get it right than now.

      With a positive outlook on growth, there will be more than double the users are smart match going forward than thei…

    • transfixedbutnotdead.com commented on Ricardo is pushing for smart match changes.

      I'm not aware of Ruby having smart match? AFAIK Perl5 stole this directly from Perl6: http://perlcabal.org/syn/S03.html#Smart_matching

      /I3az/

    • jrw32982 commented on Ricardo is pushing for smart match changes.

      You just prompted me to make my first ever post to p5p. I don't actively follow it (thanks, Mark Allen for the summaries!), but I will for a while in case my post draws any replies.

    • Vladimir Melnik commented on Subclassing Tricky Non-Moose Classes: Constructor Problems

      Thank you!

      In my case, subclassing a ResultSet of DBIx::Class has been solved by the following couple of subs:

      # Sometimes DBIx::Class has to create an object based on a ResultSet's
      # class. In several cases (for example, see the as_subselect_rs() method
      # of DBIx::Class::ResultSet) it invokes the constructor with a single
      # parameter (a DBIx::Class::ResultSource::Table-based object), which Moose
      # doesn't like.
      
      

      sub FOREIGNBUILDARGS {
      my $class = shift;
      if( (scalar(@_) eq 1) && (UNIVERSAL::can($_[0], 'isa')) ) {
      return({ _result_source…

    Subscribe to feed Responses to Comments from Mark A. Stratman

    About blogs.perl.org

    blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.