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
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; package Foo; 1; package main; print "Data::Dumper was ", defined $Data::{'Dumper::'} ? "loaded\n" : +"not loaded\n"; print "Foo was ", defined $::{'Foo::'} ? "loaded\n" : "not loaded\n"; print "Eata::Dumper was ", defined $Eata::{'Dumper::'} ? "loaded\n" : +"not loaded\n";
This solution can be applied for any -M or -d. But, to the best of my understanding, the arguments themselves are lost to the ether.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to get at perl's options in a program
by tobyink (Canon) on Nov 06, 2012 at 22:09 UTC |