RT initialdata and Perl’s nested map

Request Tracker (aka RT) comes with a very powerful, yet not too widely known tool – initialdata.  This helps with automating configuration of the new system and data migration.  Combined with the power of Perl’s map() function, some really awesome things can be done in a jiffy.

Here is a snippet I’ve used recently, to set a list of access rights to a list of queues:

push @ACL, map {
  my $queue = $_;
  map {
    {
      GroupDomain => 'SystemInternal',
      GroupType => 'Everyone',
      Queue => $queue,
      Right => $_,
    }
  } qw(
    CreateTicket
    ReplyToTicket
  )
} qw(
  dpt-Support-EN
  dpt-Support-RU
  dpt-Support-FR
);

PHP7 Reference

PHP7 Reference – An overview of the features, changes, and backward compatibility breakages in PHP 7

Unarguably the greatest part about PHP 7 is the incredible performance boosts it provides to applications. This is a result of refactoring the Zend Engine to use more compact data structures and less heap allocations/deallocations.

The performance gains on real world applications will vary, though many applications seem to recieve a ~100% performance boost – with lower memory consumption too!

The refactored codebase provides further opportunities for future optimisations as well (such as JIT compilation). So it looks like future PHP versions will continue to see performance enhancements too.