Cor — A minimal OO proposal for the Perl core
This is version 0.10 of this document.
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
sub mess_with_dollar_under { | |
print("dollar under is @{[defined($_) ? $_ : q(undef)]} in @{[(caller(0))[3]]}, before the loop\n"); | |
for ( qw ( alpha beta gamma ) ) { | |
print("dollar under is @{[defined($_) ? $_ : q(undef)]} in @{[(caller(0))[3]]}, in the loop\n"); | |
} |
sub some_func { | |
my $ctx = $_[0]; | |
return undef if ( !$ctx->{wrkdir} or !-d ctx->{wrkdir} ); | |
my $prevdir = getcwd(); | |
chdir $ctx->{wrkdir}; | |
my $status; | |
$status = f1($c); |
<p><span style="font-family: inherit;">So after I posted my tribute to my deceased dad here on Blogger, I wondered if I could use Blogger to post code. After a number of false starts, I have chosen the easiest way for me to do so. Here's a step by step for you.</span></p><p></p><ul style="text-align: left;"><li><span style="font-family: inherit;">Type out your text. Insert markers where your code should go. Markers should be a separate paragraph with easily findable text, like:<br /><br />[SNIPPET #1 GOES HERE]</span></li><li>Create a new gist for each post. Create a new file in the gist for each snippet.</li><li>Copy the embed link from the gist.</li><li>Switch to "HTML view" in Blogger.<br /></li><li>Locate each snippet marker and remove just the tags around it. I usually start at the marker and work left until I find an end tag. Then I know that the tag to the right of the end tag is the start of my snippet. The tags may be spans and font settings.</li><li>Once you have removed all the tags, replace the sn |
;;; sh-script-imode.el --- imenu does not recognize some legal bash constructs. | |
;;; Commentary: | |
;;; Dashes in function names. 2016-02-23 | |
;;; Colons in function names. 2020-04-06 | |
;;; Code: | |
;;; First, make sure to load shell mode. | |
(require 'sh-script) |
=head1 NAME | |
.perldb - Customize your Perl debugger | |
=head1 USAGE | |
Save this file in your home directory as C<.perldb>. When you run the Perl | |
debugger on some code (C<< perl -d some_code.pl >>), it will read this file | |
and use it to customize your debugger experience. |
(defun shellcheck-disable-error-at-point (&optional pos) | |
"Insert a shellcheck disable directive at the current error in the code." | |
(interactive) | |
(-when-let* ((error (tabulated-list-get-id pos)) | |
(buffer (flycheck-error-buffer error)) | |
(id (flycheck-error-id error)) | |
;;(message (flycheck-error-message error)) | |
) | |
(when (buffer-live-p buffer) | |
(if (eq (window-buffer) (get-buffer flycheck-error-list-buffer)) |
PROPOSED: | |
Shellcheck directives allow you to control how `shellcheck` works, and take the form of comments in files: | |
hexToAscii() { | |
# shellcheck disable=SC2059 | |
printf "\x$1" | |
} | |
Supported directives are |