Skip to content

Instantly share code, notes, and snippets.

@tomill
Created July 15, 2014 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomill/7f07896d6fd91bc87ae8 to your computer and use it in GitHub Desktop.
Save tomill/7f07896d6fd91bc87ae8 to your computer and use it in GitHub Desktop.
PPI fun
if ($class eq 'Structure::Subscript') {
return '[' if $source eq '{';
return ']' if $source eq '}';
return $source;
}
if ($class eq 'Structure::Constructor') {
return 'array(' if $source eq '['; # sad that php is 5.3
return ')' if $source eq ']';
return 'array(' if $source eq '{';
return ')' if $source eq '}';
return $source;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment