Let's say you're writing this a lot:
my %hew_hash;
@new_hash{@keys} = @old_hash{@keys};
In perl 5.20, you'll be able to do that slice as a single assignment:
Let's say you're writing this a lot:
my %hew_hash;
@new_hash{@keys} = @old_hash{@keys};
In perl 5.20, you'll be able to do that slice as a single assignment:
I hereby claim:
To claim this, I am signing this object:
package Pattern::NullObject; | |
use strict; | |
use warnings; | |
use overload ( | |
'""' => sub { '' }, | |
bool => sub { 0 }, | |
fallback => 1, | |
); |
I like a stand that has a swivel on it. Unfortunately they stopped making the one I like, but this one looks pretty good.
These speakers hold a charge for a good amount of time and sound pretty good.
I like to get a convex lens for the ipad too. The adhesive that comes with this kit is pretty crappy - the idea is you permanently affix a metal ring around your camera, then different lenses can magnetically attach to the metal ring. I just superglued the metal ring around the front-facing camera on the ipad, and then the lenses didn't pull that ring off.
#!/usr/bin/env perl | |
# this file is broken | |
use strict; | |
use warnings; | |
{ | |
package My::Base; | |
use Moose; |
(defun adama-run-test () | |
"Run a file with run_tests" | |
(interactive) | |
(setq compile-rpf-command (concat "/home/dev/bin/development-tools/run_tests --verbose " (buffer-file-name))) | |
(message "compile-rpf-command: %s" compile-rpf-command) | |
(compile compile-rpf-command) | |
(other-window 1) | |
(toggle-read-only) | |
(other-window 1)) |
#!/usr/bin/env perl | |
# use this in the debugger to find a package that implements some name | |
# to use this: | |
# 1. download to a local file | |
# curl https://gist.githubusercontent.com/belden/af7ea7857243743125ed/raw/76b350faaa6ec586f15d426e78d5a5f374783d5a/findsub.pl > /tmp/findsub.pl | |
# 2. load it up in the debugger | |
# DB<28> do '/tmp/findsub.pl' | |
# 3. use it | |
# DB<29> main::findsub 'prepare_body' |
use strict; | |
use warnings; | |
package Deathly::Hallows; | |
# Add a hook to force `use warnings (FATAL => 'all');` at the head of | |
# all Adama modules. | |
# | |
# 'perldoc -f require' will tell you about adding coderef hooks to @INC. | |
# | |
# Note that this toy module doesn't keep itself at the head of @INC, which |
Playing around on the train this morning:
drop function if exists belden_redef();
create function belden_redef()
returns bool
as
$$
begin
raise notice 'now you see me...';
http://support.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-20bs-20bt//downloads/DS101975 |