in reply to Re^3: How to get at perl's options in a program
in thread How to get at perl's options in a program

package Devel::PL_origargv; use strict; use warnings; our $AUTHORITY = 'cpan:TOBYINK'; our $VERSION = '0.004'; require DynaLoader; @Devel::PL_origargv::ISA = qw( Exporter DynaLoader); bootstrap Devel::PL_origargv; sub get { return _my_argc() unless wantarray; map _my_argv($_), 1 .. _my_argc(); } 1;

#include "EXTERN.h" #include "perl.h" #include "XSUB.h" MODULE = Devel::PL_origargv PACKAGE = Devel::PL_origargv PROTOTYPES: DISABLE int _my_argc () CODE: RETVAL = PL_origargc; OUTPUT: RETVAL char * _my_argv (x) int x CODE: RETVAL = PL_origargv[x - 1]; OUTPUT: RETVAL

Replies are listed 'Best First'.
Re^5: How to get at perl's options in a program
by tobyink (Canon) on Apr 26, 2014 at 22:55 UTC

    OK, released as 0.004.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
      Bless you! After almost two years of fallowness, I am back to working on Devel::ptkdb, which is the reason why I started this thread in the first place. And now I see that it's been de-Inline'd. Thank you!