in reply to Pattern for a shell-style call + error response
Then things do look a little more perlish:#!/usr/bin/perl use strict; use warnings; package Third::Party::Library::Call; use base 'Third::Party::Library'; foreach my $method (qw/bazinate barify/) { no strict 'refs'; my $subref = __PACKAGE__->can($method) || die "Unknown method: $method"; *$method = sub {my $stat = &$subref(@_); return !$stat; }; }
my $libobj = Third::Party::Library::Call->newObj; $libobj->bazinate or die $libobj->GetErrorCode;
|
|---|