sunnyagarwal008 has asked for the wisdom of the Perl Monks concerning the following question:
and here is the wrapper module:package ABC; $ABC::VERSION = '0.02'; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; require DynaLoader; require AutoLoader; @ISA = qw(Exporter AutoLoader DynaLoader); # Items to export into callers namespace by default. @EXPORT = qw( new_time_var dl_ascii_to_date dl_ascii_to_time dl_close_cache ); @EXPORT_OK = qw(); bootstrap ABC $VERSION;
The actual subroutine signatures are:package PQR; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; require AutoLoader; use ABC; $PQR::VERSION = $ABC::VERSION; @ISA = qw(Exporter AutoLoader); @EXPORT = qw( new_time_var dl_ascii_to_date dl_ascii_to_time dl_close_cache ); @EXPORT_OK = qw(); sub new_time_var { return ABC::new_time_var(@_); } sub dl_ascii_to_date { return ABC::dl_ascii_to_date(@_); } sub dl_ascii_to_time { return ABC::dl_ascii_to_time(@_); } sub dl_close_cache { return ABC::dl_close_cache(@_); }
When I test this using a script I get the following errors:<new_time_var>() <dl_ascii_to_date>(<string>) <dl_ascii_to_time>(<string>, <dtp>) <dl_close_cache>(<dcp>)
Prototype mismatch: sub PQR::new_time_var () vs none at /u/agarwsun/projects/packages/datelib/lib/perl5/5.8.6/i86pc-solaris/PQR.pm line 71.>/u/agarwsun/test> perl -wc test.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating wrapper over a wrapper (prototype mismatch)
by moritz (Cardinal) on May 05, 2010 at 10:17 UTC | |
|
Re: Creating wrapper over a wrapper
by Anonymous Monk on May 05, 2010 at 10:19 UTC | |
by sunnyagarwal008 (Initiate) on May 05, 2010 at 13:38 UTC | |
|
Re: Creating wrapper over a wrapper
by almut (Canon) on May 05, 2010 at 14:09 UTC | |
by sunnyagarwal008 (Initiate) on May 06, 2010 at 05:45 UTC | |
by almut (Canon) on May 06, 2010 at 07:27 UTC | |
by sunnyagarwal008 (Initiate) on May 06, 2010 at 09:16 UTC | |
by almut (Canon) on May 06, 2010 at 10:01 UTC | |
by Anonymous Monk on May 06, 2010 at 09:53 UTC |