Skip to content

Instantly share code, notes, and snippets.

@hanabokuro
Created September 20, 2013 12:43
Show Gist options
  • Save hanabokuro/6636905 to your computer and use it in GitHub Desktop.
Save hanabokuro/6636905 to your computer and use it in GitHub Desktop.
snippet for perl. expand "package".
# -*- mode: snippet -*-
# name: package
# key: package
# --
package ${1:`(if (string-match "/lib/\\(.*\\)\\.pm" buffer-file-name) (replace-regexp-in-string "/" "::" (match-string 1 buffer-file-name)) "")`};
use strict;
use warnings FATAL => qw(all);
$0
1;
__END__
=encoding utf-8
=head1 NAME
$1 -
=head1 DESCRIPTION
=head1 AUTHOR
`(user-full-name)` `(if (boundp \`user-mail-address) (format "- E<lt>%sE<gt>" user-mail-address) "")`
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment