Slash Boxes
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • In Perl::Dist(::WiX), the goal is to create and package a new installation of perl, with added modules as required. (upgrading core modules, providing SQLite for CPAN use, etc.)

    The last part right now is implemented by writing out scripts from the old perl that are executed in the NEW perl to install modules there, and to query which modules require upgraded.

    What would be your solution to that? Note that we are using the current version of perl (I use 5.10.0) to create 5.8.8, 5.8.9, and 5.10.0 installations

    The new Strawberry Perl for Windows has been released! Check for it.
    • The problem with writing intermediate programs by wrapping them in a q(), qq() or endless concatenations is that it's unclear and hard to maintain. There are a few options that help make it easier and more understandable and thus more maintainable but you can't always use them:

      Using a template such as Text::Template or Template Toolkit is the best option IMHO. That is, if you're able to read files from your environment. Considering you're writing to it, you can probably read.

      Manually creating a template and putting it in some scalar or hash with indication of where to change and then in the code just search and replace on that template. Example:

      $templates{'startup_check'} = q(
          BEGIN {
              print "hello ##WHAT##";
      # ... later in the program
      search_replace( $templates{'startup_check'}, '##WHAT##', 'world' );

      You can put it in the __DATA__ section in the file. A bit trickier but will definitely be easier to maintain.

      When all else fails, at least you know you noticed it and tried to do something about it. There's a lot of times where red flags don't necessarily mean "I've made an error" but instead mean "this isn't the best practice but it's the correct one in this case".

      Thanks for the comment and sorry for the long delay in reply.