Skip to content

Instantly share code, notes, and snippets.

View wchristian's full-sized avatar

Christian Walde (Mithaldu) wchristian

View GitHub Profile
package Exporter::Graft;
# DO NOT USE UNDER MOD_PERL OR ANY OTHER SORT OF SINGLE-PROCESS-CONCURRENCY!
# IT IS LIKELY THAT ONE CALLER TO THIS WILL STOMP THE CHANGES ANOTHER CALLER
# MADE WITH THIS BEFORE THE FIRST CALLER CAN USE THEM.
# FASTCGI SHOULD BE FINE.
use strict;
use warnings;

welche Gründe sprechen für eine "neuere" Version?

Vielen Dank für die Frage, es gibt nicht viele Leute die sie stellen würden.

Gründe gibt es viele. Allen voraus, ein wenig Kontext: Perl 5.8.6 wurde am 27. November 2004 veröffentlicht. Seitdem wurde Perl kontinuierlich weiterentwickelt, sowohl im Bereich der Fehlerbehebung als auch durch das Hinzufügen von neuen Features. Das sind über 5 Jahre Entwicklung.

Am 23. August 2009 wurde Perl 5.10.1 (sozusagen 5.10 SP1) veröffentlicht, welches momentan einen guten Kompromiss bietet zwischen "wurde real angewendet und hat keine groben Probleme" und "das Aktuellste". (Seitdem wurden 11 neue Versionen veröffentlicht mit der aktuellsten öffentlichen 5.12.1 vom 16. Mai und der aktuellsten Entwicklerversion 5.13.3 vom 20. Juli.)

Interessante Dinge die sich von 5.8.6 bis 5.10.1 getan haben:

10-08-25@10:16:24 (@t0m) class attributes are evil. Usually if you think you want them then your design is wrong. (Or at least you need to be veeery sure you know exactly what corener you're about to paint yourself into)
10-08-25@10:16:33 (@t0m) *corner
10-08-25@10:17:33 (@sartak) hitler used class attributes
10-08-25@10:19:55 (marcus) hitler used NEXT
10-08-25@10:26:17 (@osfameron) hitler wrote PHP
10-08-25@10:28:21 (Mithaldu) t0m: http://perlmonks.org/?node_id=856821
10-08-25@10:28:42 (Mithaldu) thinking about using them to return string-only stuff about the target/metric plugins
10-08-25@10:29:10 (Mithaldu) such as the column name a specific class of metrics would use in text tables
10-08-25@10:35:54 (@t0m) yeah, that sounds like a bad idea :)
10-08-25@10:36:00 (Mithaldu) what why
use strict;
use warnings;
package Code::Statistics::Metric::ccomp;
# ABSTRACT: measures the cyclomatic complexity of a target
use Moose;
extends 'Code::Statistics::Metric';
D:\Ubic-1.14>dmake test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00_compile.t ............ ok
t/cmd.t ................... Failed to eval 't/service/sleeping-daemon': The 'user' parameter (undef) to Ubic::Service::SimpleDaemon::new was an 'undef', which is not one of the all
owed types: scalar
at lib/Ubic/Service/SimpleDaemon.pm line 23
Ubic::Service::SimpleDaemon::new(undef, 'HASH(0x1cd64ec)') called at t/service/sleeping-daemon line 4
eval 'package UbicService1;
# line 1 t/service/sleeping-daemon
sub _default_infx_format {
my ( $self ) = @_;
return {
sfArriveCode => {
col => 10, len => 3
},
sfDepartCodeRet => {
col => 13, len => 3,
function find_thumb_link_containers () {
var post_link = "a[href*='/post/view/']";
var has_thumb_img = ":has(img[src*='/thumb/'])";
var list = $( post_link + has_thumb_img ).parent();
return list;
}
"prereqs" : {
"runtime" : {
"requires" : {
"App::Cmd" : 0,
"DateTime::Format::Strptime" : 0,
"File::Slurp" : 0,
"Moose" : 0,
"MooseX::HasDefaults::RO" : 0,
"Parse::Range" : 0,
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\tr>cpan
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]> install Devel::CheckLib
# This Makefile is for the DateTime::TimeZone extension to perl.
#
# It was generated automatically by MakeMaker version
# 6.56 (Revision: 65600) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#