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

It's not built every single time. It's only rebuilt if it's missing or if there have been modifications to the .pm file since the last build. If you don't like it being built in the current working directory, then create a ~/.Inline directory.

I'd happily accept a patch to XSify the module, but I'm not going to write that myself. It seems more effort than would be deserved by this silly little module.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
  • Comment on Re^3: How to get at perl's options in a program

Replies are listed 'Best First'.
Re^4: How to get at perl's options in a program
by Anonymous Monk on Apr 26, 2014 at 21:39 UTC
    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

      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!
Re^4: How to get at perl's options in a program
by Anonymous Monk on Apr 26, 2014 at 10:22 UTC

    I'd happily accept a patch to XSify the module, but I'm not going to write that myself. It seems more effort than would be deserved by this silly little module.

    Um, when you build it on your machine, copy the .xs files it generates, the end