Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created June 30, 2020 19:53
Show Gist options
  • Save kentfredric/875a5d2f9d56a7438669cbabfdc3b885 to your computer and use it in GitHub Desktop.
Save kentfredric/875a5d2f9d56a7438669cbabfdc3b885 to your computer and use it in GitHub Desktop.
#!perl
#p7-pretend
use strict;
use warnings;
use feature 'signatures';
no warnings "experimental::signatures";
use lib '.';
use OMG qw(foo);
foo 1,2;
#p7-pretend
use strict;
use warnings;
use feature 'signatures';
no warnings "experimental::signatures";
package OMG;
BEGIN {
# pretend this says
# if ( $] >= 7 ) {
if (1) {
require feature;
feature->unimport('signatures');
}
}
use Exporter;
*import = \&Exporter::import;
our @EXPORT_OK = ( 'foo', );
sub foo($$) {
printf "Hello, your arguments were: %s %s\n", @_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment