The Perl and Raku Conference 2023 in Toronto
Attending this event?
Back To Schedule
Wednesday, July 12 • 2:30pm - 2:50pm
Locked in a box: Why closures are your friends.

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Closures – and anonymous subs in general – provide a simple, dynamic way to control code without huge if-blocks. Problem is that most people don’t know how to use them or why.

From testing to formatting to debug output, anonymous subs and closures make for simpler, cleaner, and often times faster code. This is a look at what anonymous subs can be used for and why closures are so helpful. The basic ideas work equally well in Perl and Raku and are presented with examples from both for testing, cleaning up if-logic, and making for faster, simpler code.

avatar for Steven Lembark

Steven Lembark

Yo!, Workhorse Computing
I've been working with Perl since the 1990's, using it for everything but salads -- texture isn't quite right. Most of my work with Perl has been with web back ends, financial data, bioinformatics, sysadmin/DBA utilities, ETL, automation, and occasionally flying a quad-copter.

Wednesday July 12, 2023 2:30pm - 2:50pm EDT
Track R

Attendees (8)