Skip to content

Instantly share code, notes, and snippets.

@willert
Created October 9, 2009 03:53
Show Gist options
  • Save willert/205688 to your computer and use it in GitHub Desktop.
Save willert/205688 to your computer and use it in GitHub Desktop.
my %args = %{ $self->interp_args || {} };
if ( my $enc = $self->encoding ) {
my $old_func = delete $args{ postprocess_text };
$args{ postprocess_text } = sub{
$old_func->( $_ ); $_ = $enc->decode( $_ );
};
}
return $self->interp_class->new(
%args
allow_globals => [ map{ $_->[0] } @{ $self->globals } ],
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment