Posts with the tag perl:
What’s next This is my last post that targets IronMan. So if you want to keep reading my blog, which will probably argely be a mix of security, and java with occasional dev ops, please subscribe directly. If you have suggestions for what categories I should collect things under fee free to comment. Currently the only for sure category is Security.
Why not Perl? This post is 3 years in the making.
As of today I have decided to remove myself as maintainer/co-maintainer of all my Perl modules. Feel free to adopt them
Firstly what is Polymorphism and why is it so important? Polymorphism is the ability to have a many implementations of a behavior that conform to a single interface. Put in perhaps slightly better, pragmatic terms, you have one implementations of a caller, that can operate on many implementations of a “parameter”, without conditionals, or changing the callers code. For instance the following, pseudo?, Perl 6-ism method handler( $obj ) { $obj.
Sometimes you want to remove behavior from your code in a future version, here’s the right way to do it.
I’ve noticed a common problem with regular expressions and Hex Characters, so I thought I’d blog about it. The most common way to regex a UUID, or SHA1 or some other hex encoded binary value is this (and I’ve seen this in Perl libraries and StackOverflow answers).
[a-f0-9] or [A-F0-9]
Neither of these are correct as Hex is case insensitive and both of these regex’s are. Hex is most commonly lowercase (unless you’re Data::UUID), but that’s an aesthetic, not a requirement.
2014-02-27
2021-08-10
perl
Some of you may have noticed a while back that converted Pod::Spell to the use of File::ShareDir::ProjectDistDir instead of keeping the wordlist in Pod::Wordlist::__DATA__. This move was made in conjunction with making Pod::Wordlist an Object, and in preparation for a time when you’ll be able to specify your own wordlist file. It was also made so that non technical contributors could more easily update the wordlist without going near anything that looked like code.
2013-11-02
2021-08-10
perl
This is a response to Chromatics blog post Would You Miss Autoderef in 5.20?, because I can’t ever get comments to work on his MT for something like a year (500, or some blogger openid incompat).
In all honesty I don’t find either particularly interesting. I’ve too often been targeting 5.8 or 5.10 for syntax… @{ $foo } is really the most I’ve ever needed,@$foo is nicer, but beyond that don’t need it.
So when I started using Dependency Injection the following problem happened, how do I Inject this dependency when the container is not accessible at this point. Ok, that sentence even confused me a little bit, so what do I mean. Let’s say I have a Repository for Products that is injected into my controller. Each Product stored has one or more ProductVariants that is part of it’s aggregate, which itself has Nested Categories.
Just before my abrupt departure from my former employer, I took over maintaintership of Pod::Spell. I have started working to clean up the code, add modern and more tests, and improve the wordlist. There is much to be done on this front. More tests are needed yet, to ensure no accidental breakage. There’s possibly a unicode bug lurking within Pod::Spell. More words are needed for the wordlist. Patches are welcome as I don’t have all the time in the world to work on it.
2013-07-06
2021-08-10
perl
File::chmod has been around for a long time, and is really stable, and really hasn’t changed since 1999. It is far more user friendly than thechmod() in core Perl. I recently used it for an interview test. It took me a few times to get right however because it’s default behavior in symchmod() mode is to use the systems umask. I find this to be very confusing behavior. I actually thought it was a bug at first, and asked for comaint since it hadn’t been updated in so long.