Skip to content

Instantly share code, notes, and snippets.

View happy-barney's full-sized avatar

Branislav Zahradník happy-barney

  • Earth, Solar system
View GitHub Profile

Local can be specified many times

{
	local local local local $a;
}

Conditional operator (ternary operator) can be localized effectively providing conditional local

Conditional inclusion/exclusion of alternatives

Requires parser capable to evaluate lookup predicate, such as GLR parser. With additional complexity on declaration side it may solvable by error handling magic but I didn't solve this puzzle so far.

Example: multiple grammar variants in one definition file:

allowed_indirect_method:
use feature 'cleanup_block';
no warnings 'experimental::cleanup_block';
use lib 't';
require 'test.pl';
sub it {
my ($title, %params) = @_;

Meta signatures

Abstract

Imagine every function of instance of its own class with every function argument as class field.

@happy-barney
happy-barney / perlbrew-ci.pl
Last active March 11, 2023 11:02
perlbrew-travis-yaml.pl
#!/usr/bin/perl
#
# perlbrew-ci.pl prove [prove options]
# - runs install command
# - runs prove for each perl library
#
# perlbrew-ci.pl install
# - install all perls specified in your .travis.yml
# - create project library (".travis.yml"->parent->basename) for each perl
# - install project dependencies
@happy-barney
happy-barney / perl versioning change proposal.md
Last active September 23, 2018 10:23
perl5 versioning change proposal

Proposal

Let's start to use year as version, eg:

bash$ perl -Mv5.2018
Perl v5.2018.0 required--this is only v5.6.2, stopped.
BEGIN failed--compilation aborted.

Motivation