James E Keenan will give a talk at YAPC::NA 2012 described as:
In fifty minutes, this presentation will provide you with 82 percent of what you need to know to be a competent user of Perl’s core testing functionality.
If you are new to Perl — or if you know Perl but have shied away from learning to write tests — this presentation is for you!
Back when Curtis Poe was at Booking.com we were in the the first team to use Moose (actually Mouse at the time) for anything serious. While it saved us a lot of time overall that we'd otherwise have spend on writing boilerplate code we found the Moose support for type constraints to be fairly inflexible for our purposes.
Moose will simple die if you pass it a value that violates a type constraint, in an environment where you control the whole stack this is usually what you want, but when you're dealing with data from other people and user-supplied parameters you often want to handle the situation more gracefully.
Curtis pointed this out on the Moose mailing list, and quickly found that this was something covered in the Moose FAQ.
Thanks to the many contributors to this release. Below is a summary of changes.
2.0.6 April 24, 2012
Preserve 5.8 compatibility surrounding use of MUTABLE_CV [Adam Prime]
Move code after declarations to keep MSVC++ compiler happy. [Steve Hay]
Adopt modperl_pcw.c changes from httpd24 branch. [Torsten Foertsch]
Pool cleanup functions must not longjmp. Catch these exceptions and turn
them into warnings. [Torsten Foertsch]
Fix a race condition in our tipool management.
See http://www.gossamer-threads.com/lists/modperl/dev/104026
Patch submitted by: SalusaSecondus
Reviewed by: Torsten Foertsch
Ensure that MP_APXS is set when building on Win32 with MP_AP_PREFIX,
otherwise the bundled Reload and SizeLimit builds will fail to find a
properly configured Test environment.
[Steve Hay]
Fix a few REFCNT bugs.
Patch submitted by: Niko Tyni
Reviewed by: Torsten Foertsch
From the C++11 FAQ, section on rvalue references, about a simple incrementation function incr:
If that incr(0) were allowed either some temporary that nobody ever saw would
be incremented or - far worse - the value of 0 would become 1. The latter
sounds silly, but there was actually a bug like that in early Fortran
compilers that set aside a memory location to hold the value 0.
That actually made me think about that nifty one-liner:
Patrick Michaud will give a talk at YAPC::NA 2012 described as:
One of the significant new features of Perl 6 is its support for lazy and infinite lists, arrays, sequences, and other data structures. However, these new features have far-reaching impacts on the whole of Perl 6 design and implementation. Over the past several years there have been many attempts at a coherent design and implementation of Perl 6 lists, each leading to new challenges to be addressed and resolved.
In this talk I’ll shed some light on Perl 6 lists, arrays, sequences, and other structures, explaining some of the fundamentals of how they work and can be used in Perl 6 programs. Lots of examples will be given, with particular emphasis on the lazy, infinite, and flattening behaviors of lists and some of the new range and sequence operators. I’ll also describe how these features have affected Perl 6 development, including an introduction to some of the newer data types such as LoLs, Parcels, Captures, Iterators, and Positionals.
Come to this talk and learn how Perl 6’s list features can result in more elegant and faster code.
Last year I wrote script to automatically tidy up your Perl code as it is commited by Git. I just ironed out a final issue that had been bugging me: partially indexed files. That change plus a few documentation cleanups are now available as version 0.04 from my Github repository or as a .zip file.
I also uploaded a distribution (App-githook-perltidy) to CPAN however I'm not sure yet if it is installable as it doesn't contain any Perl module files, and cpanm at least doesn't seem to install based on distribution name only. Anyone have thoughts on if it makes sense to have a single-script CPAN distribution?
Connecting to Oracle with a proxy connection like this:
DBI->connect( $dsn, 'user[otheruser]', 'password', $option_list)
We recently updated DBI to 1.620 and DBD::Oracle to 1.44 (late last week I think). Today I saw an error that I have never seen before (but should have). "ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit" You see otheruser has a profile that limits SESSIONS_PER_USER to one. We're creating between one and eleven of these database connections simultaneously in different processes.
So I tried it with the older install that was using DBI 1.616 and DBD::Oracle 1.30. I didn't receive the error so it appears that the SESSIONS_PER_USER profile limit was not being respected.
We're bumping up the SESSIONS_PER_USER where appropriate and adding some checks for this error condition now that it's being thrown.
I'm curious if anyone is aware of which change may have caused this to start working correctly?
I measured the size of some big modules, with B::Stats and B::C, statically compiled.
This amounts to about to the same size as dynamic usage via perl, with all options and modules used at once. I.e. the worst-case scenario.
Interestingly Module::Build is much harder to compile - you'd need 6GB RAM at least -
and much bigger in the end-result than Moose, which compiles/compresses really fine.
Modules
Module::Build
perl -e'use Module::Build: print q(k)'
ops
68K
files
48
src lines
18K
compiled c lines
1.5M
perl compiler memory
360M
gcc compiler memory
3.4G
executable size
37M
Moose
ops
91K
files
109
src lines
28K
compiled c lines
889K
perl compiler memory
218M
gcc compiler memory
1.6G
executable size
23M
DateTime::TimeZone
ops
2.3K
files
6
src lines
2.2K
compiled c lines
130K
perl compiler memory
19M
gcc compiler memory
415M
executable size
32M
Typical Apps
Biggest cPanel app
The recipe for less than 2MB RAM and gcc < 4.5 is:
cc_harness -E -o$@-cpp.c $@.c
cc_harness -O0 -fno-var-tracking -fno-stack-protector \
-fno-tree-loop-optimize \
-fpreprocessed -fno-exceptions $@-cpp.c
Looking for the Position that Fits your Work Style?
Education is one of the most relevant topics in our nation, because it is important. LiveText is doing forward looking work in education that is making a difference. We’re looking for “difference making” people. If you’re a smart and energetic self-starter who would like to “make a difference” in transforming education, we want to talk to you!
By hiring top people and nurturing a culture that empowers and rewards those people, we are building one exceptional company.
Open positions include:
Software Engineer
MySQL Database Administrator
User Interface Designer
Systems Administrator
System Architect
LiveText provides schedule flexibility, an open office environment, and a full benefits package that includes: Medical, Dental, Life Insurance, 401k, and Paid Vacations/Holidays.
If you’re interested in any of the open positions, visit the LiveText booth located within Exhibit Hall B of the Job Fair and Expo. Resumes may also be forwarded to, “resume@livetext.com”.
While I was working on some Moose code this past week, I was struck (again) by how the lazy property of attributes functions almost like a cache. In fact, often when working in Moose I find that when I want something to be cached, I just make it lazy and call it a day.
Let me illustrate what I’m talking about with some code. Now, the real process of putting this code together involved a lot of blind alleys and false starts, but I’m going to present it like I came up with the final product smoothly and without interruption. I do this for two reasons: one, it makes for less frustrating reading, and, two, it makes me look smarter. ;->
So I’m creating a little command line utility to do some moderately complex data loading. I decide to use MooseX::App::Cmd for the basic structure—this is an excellent module that I’m using more and more these days. Definitely check it out.
Early in February, I received a jury summons for the United States District
Court, Southern District of California. Prospective jurors for federal jury
service (at least in this court) are placed on call for a period of about 30
days. I was to call for instructions on April 1 and potentially proceed to do
so periodically until May 4 (assuming I wasn’t instructed to report).
Since my initial instruction date was nearly two months away, I created an
entry for it in Google Calendar, and promptly forgot about it. On Monday,
April 2, I was riding the train to work when I realized that I hadn’t
remembered to check my instructions. Fortunately, after arriving at my office
and checking my instructions, I had been deferred to the next day.
So I added a new entry in Google Calendar, this time with an SMS reminder. I
proceeded to do this for most of April, checking my instructions and
duplicating the calender entry with another SMS reminder.
I’m embarrassed to admit that it wasn’t until the last week of April that it
occurred to me that I could automate the whole process. After all, isn’t
automating drudgery the whole reason I ended up programming Perl in an
engineering support group at my day job?
Because I am interested in the result, I wanted to make the community aware of this question on StackOverflow. If you have an opinion answer there. Perhaps I will summarize the results here when the discussion warrants.
Martin Holste will give a talk at YAPC::NA 2012 described as:
Hadoop is overrated. Come see what modern Perl can do with map/reduce on terabytes of data with an extremely simple, maintainable architecture by orchestrating the inserting and querying of data on enormous scales. This talk will deconstruct the Enterprise Log Search and Archive (ELSA) project which is fully written in asynchronous, object-oriented Perl and provides a framework for Big Data analytics in a modular, pluggable architecture with the flexibility and customization that only Perl can provide.
The latest B::C package on CPAN 1.42 works stable for almost all perls until 5.14, but so far did not work good enough for the upcoming 5.16 release.
I couldn't even pinpoint to a specific perl change which caused the problems. I know that hashes need a different initialization now. Empty hashes need to declare
HvTOTALKEYS(hv) = 0
after creation, and readonly hashes must be set readonly after they were created.
DynaLoader and %INC handling is much stricter now with 5.16.
Alberto Simões will give a talk at YAPC::Europe 2012 described as
In this talk I will present the recipe I am using to build Perl Modules that depend on C or C++ libraries (and that ship those C or C++ libraries with the module itself).
The recipe uses a mixture of Module::Build custom building module, ExtUtils::CBuilder for C compiler interface, ExtUtils::LibBuilder to adapt some ExtUtils::CBuilder defaults that make standards library build impossible, and Config::AutoConf for externals libraries and headers detection.
This recipe has been used in a lot of different modules I maintain: Lingua::Identify::CLD, Text::BibTeX, Lingua::Jspell and the recent Lingua::FreeLing2 (still beta) and Lingua::NATools (still not released at the date).
Frew Schmidt will give a talk at YAPC::NA 2012 described as:
This talk will be a whirlwind overview based on the talk I did a couple years ago. The general overview version of that talk ended up in https://metacpan.org/module/DBIx::Class::Manual::Features. This talk will cover (most of) that material, but additionally at least give examples of more advanced topics like correlated subqueries, deployment with DBIx::Class::DeploymentHandler, and will additionally have a bit of my own opinions on modules you should be using with DBIx::Class.
Beginners will certainly find the talk a good jumping off point for DBIC, but I hope to include about 10-20 minutes of advanced topics at the end if seasoned users want to join late.
This talk has already melted hundreds of geek neocortexes in both London
and Oslo in the past fortnight; next week it will wreak its terrible
destruction on Lusitanian minds as well.
So, if you’re in Lisbon, don’t miss out on my most brain-twisting
talk ever. Thursday May 3 from 7pm at Edifício Fórum Picoas. Entry is
free and everyone is welcome (though you do need to
register to ensure a seat).
Damian
PS: My sincere thanks to SAPO for sponsoring this event.
I catch myself always saying, "No, not yet stable enough." I cannot release it, even though it passes all tests.
Which you can interpret that the tests suck. Not enough coverage, bad testcases, ...
Well, that is always the case. You can never have enough tests. Problem is that in my case, the compiler, testing costs a lot of time. LOT of time! I usually spend a week to do the final release testing, but more often it lasts several weeks, because one round of test results influence the decisions of TODO, SKIP and mandatory PASSing tests, and then I'll redo the tests. On all versions, with all platforms. You could rely on cpantesters to do that for you, but it is better to do the most common combinations by your own. That's why I use perlall with a few hundred perls.
Recently I had the pleasure of spending three hours debugging an obscure bug. An obscure bug I caused by introducing a newline. That little punk, 0x0A.
I released a new version of a command line program. For me, it’s an elegant piece of work, combining a marvelously complex-but-intuitive configuration for system administrators with an absolutely simple interface for users. To use the command, the user runs it with a couple of arguments and it prints out a single line of useful text derived from that marvelously complex configuration.
But, it doesn’t print a newline.
It’s never printed a newline. The original author didn’t include one for some reason. Anyone who has ever encountered a command like this knows well my irritation.
my awesome prompt> some_lame_command
my awesome prompt>e answer
Argh!
The workaround I’ve seen used, after seeing the above is to face-palm, then run the command again, only differently.