Create a gist now

Instantly share code, notes, and snippets.

Embed
Atom Snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.source':
'Section Divider':
'prefix': 'divider'
'body': '#-------------------------------| HEADER |-------------------------------#'
# Perl Getopt Long Command Line Options
'.source.perl':
'Command Line Options':
'prefix': 'clops'
'body': """
use Getopt::Long; use Pod::Usage;
#-------------------------------| COMMAND LINE |-------------------------------#
my $FILE = "";
my $usage= "\n\n$0 [options]\n
Options:
-f File
-help Shows this message
\n";
# OPTIONS
GetOptions(
'f=s' =>\$FILE,
help =>sub{pod2usage($usage);}
)or pod2usage(2);
checkCLA();
"""
# Perl Module Header
'.source.perl':
'Perl Module Header':
'prefix': 'pm'
'body': """
package ;
use Exporter qw(import);
our @ISA = qw(Exporter);
our @EXPORT = qw(); #functions exported by default
use strict; use warnings; use diagnostics; use feature qw(say);
use Carp;
sub {
}
1;
"""
# Perl Subroutine Descriptive Header
'.source.perl':
'Perl Subroutine Header':
'prefix': 'subhd'
'body': """
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# $input = ();
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# This function takes arguments
#
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# $output = ();
# $return = ();
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment