Skip to content

Instantly share code, notes, and snippets.

@xenoterracide
Created November 3, 2012 21:56
Show Gist options
  • Select an option

  • Save xenoterracide/4008988 to your computer and use it in GitHub Desktop.

Select an option

Save xenoterracide/4008988 to your computer and use it in GitHub Desktop.
injectable example
sub _build_cybs_wsdl {
my $self = shift;
my $dir = $self->_production ? 'production' : 'test';
load 'File::ShareDir::ProjectDistDir', 'dist_file';
return load_class('Path::Class::File')->new(
dist_file(
'Business-CyberSource',
$dir
. '/'
. 'CyberSourceTransaction_'
. $self->cybs_api_version
. '.wsdl'
)
);
}
has cybs_wsdl => (
required => 0,
lazy => 1,
is => 'ro',
isa => File,
builder => '_build_cybs_wsdl',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment