Skip to content

Instantly share code, notes, and snippets.

@jkeroes
jkeroes / Dancer development.yml plugins
Created May 2, 2012 16:21
Dancer development.yml plugins
plack_middlewares:
# -
# - 'JSON::ForBrowsers'
-
- Debug
- panels
-
- Dancer::Version
- Memory
- Timer
@jkeroes
jkeroes / debug_plugins_development.yml
Created May 2, 2012 16:22
debug_plugins_development.yml
plack_middlewares:
-
- 'JSON::ForBrowsers'
-
- Debug
- panels
-
- Dancer::Version
- Memory
- Timer
plack_middlewares:
-
- 'JSON::ForBrowsers'
-
- Debug
- panels
-
- Dancer::Version
- Memory
- Timer
@jkeroes
jkeroes / compare_backtracking_regexen.pl
Created May 14, 2012 18:23
Catastrophic backtracking and regexp optimization in Perl
#!/usr/bin/perl
use 5.10.0;
use strict;
use warnings;
use Benchmark qw/:all :hireswallclock/;
use Regexp::Optimizer;
my $max_len = 4250;
my $bad = '^(aa|aab?)+$';
@jkeroes
jkeroes / perl-memory-modules
Created September 21, 2012 20:28
Perl memory leaks resources
Tracking memory leaks:
Devel::Arena - sv_stats() returns arena structures used for SV allocation
* Devel::Cycle - find_cycle($ref) returns all cycles found in $ref and the perl variables they point to
Devel::Gladiator - walk Perl variable arena
Devel::Leak - deprecated by Devel::LeakTrace::Fast
Devel::LeakTrace - deprecated by Devel::LeakTrace::Fast
* Devel::LeakTrace::Fast - prints leaked SV's and line numbers at END.
Data::Structure::Util - has_circular_ref($ref) returns ref to link in $ref that is circular or false.
Test::LeakTrace - no_leaks_ok(), etc.
Dancer2 - Revolution
Nothing indicated troubles, February 18, 2013 Alexis Sukrieh reports in his blog and in the newsletter dancer-users @ that will release Dancer2 as an independent project, and it will not replace the existing Dancer. February 22 at CPAN distribution Dancer2 appears to version 0.01.
Dancer2 originally created from scratch based Moo framework for Grease OOP system easy to extend and maintain. Mainly dealt with the new version of the problem - getting rid of the global variables and isolate the application from any potential conflicts. It also planned to provide 100% compatible with the Dancer, to be possible transparent migration of legacy applications and plug-ins for the new version of the framework.
In fact, since last fall has been frozen development Dancer and all the forces were sent back for revision Dancer2. But then it became clear that a transparent migration can not be performed primarily for technical reasons. Engines (engines) templating, sessions, logs differ significantly Da
@jkeroes
jkeroes / perlbrew perl install with libs.markdown
Last active November 19, 2019 17:26
Build Perl with perlbrew, libs, and cpanm

Install Perlbrew with the system perl

curl -L http://install.perlbrew.pl | bash

Initialize Perlbrew

mkdir /opt/perlbrew
export PERLBREW_ROOT=/opt/perlbrew
export PERLBREW_HOME=/opt/perlbrew

perlbrew init # and follow the directions

=== CI

== Problem

autoprove (Test::Continous) broken in 5.18.0 Smolder is broken on OSX in 5.12+

== Solution

Jenkins. A fork of Hudson. Mature, supports many plugins.

Continuous Integration

Continuous Integration (CI) is the autotesting of unit tests.

Why autotest?

There are many good answers. First and most importantly, developers get fast notification of when and where defects were committed to the source code repo. Testing on multiple platforms and environments also becomes possible and automatic. Invoking a unit test build manually is silly when we have computers. Let's be smart and lazy.

Problem

appname: CA-API
charset: 'UTF8'
content_type: "text/html"
template: "template_toolkit"
session: 'YAML'
allow_blessed: 1
convert_blessed: 1