- Prototypes
- what happens when you add a & to the start of a function call (aka why you shouldn't)
- split in void context
- goto function
- values vs variables (a superset of lists vs arrays)
- wantarray and contexts (void, scalar, list)
- pseudohashes
- tie
- typeglobs
- PadWalker
- source filters
- adding methods to existing classes
- interpolating things that aren't scalars or arrays
- when to use each vs keys
- warnings
- how to disable certain warnings without affecting other warnings
- how to add categories
- B::Deparse, showing the magic Perl does for you
- while (<>), while (readline), and while(readdir)
- default values for split, print, etc.
- do file
- weird operators
- special variables
- %main::
- $]
- $"
- $,
- $/ and $\
- %SIG
- what strict does and why
- symbolic references
- barewords
- regex magic
- \k
- \g
- \G
- \Q
- differences between scalar and list context
- recursion
Wednesday, March 3, 2010
Parts of Perl you never knew existed
This is a list of some of the darker, scarier, or lesser known areas of Perl. I am going to be grouping them into a set of talks to scare, disgust, and delight the DC Perl Mongers. There is no ordering to them In this post; I am just trying to start a list of talk items.
Subscribe to:
Post Comments (Atom)
For regexes, I suggest talking about recursive regular expressions. Scary, mind blowing and awesome all at the same time.
ReplyDeleteDon't forget to talk about putting code refs or even objects into @INC!
ReplyDeleteTo find a good list of scary things, try to think of all the situations where "no strict $something" is appropriate and acceptable. That should come up with some interesting cases.
Also, XS (or rather perlapi) offers a wide range of WTF's. My personal favourite (not part of the API) is how (I think) List::Util creates a "mock" OP for calling rand()/srand() from XS. This is probably surpassed by Chocolateboy's dynamic pp_entersub-replacing in Class::XSAccessor.
Don't forget fun things like Sub::Uplevel. Explaining how it works should scare people pretty well.
ReplyDelete@Michael Yeah, recursive regexes are part of it. I put "recursion" and "differences between scalar and list context" under warnings by mistake.
ReplyDeleteMore fun stuff: calling close() with no arguments.
ReplyDelete