Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

use dirty .pm

by Jaap (Curate)
on Feb 21, 2005 at 09:52 UTC ( #432987=perlquestion: print w/ replies, xml ) Need Help??
Jaap has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently using Doxygen which creates a .pm file that looks like this:
$doxydocs= { classes => [ ], namespaces => [ ], files => [ { name => 'agc_1fs.hdf.c', includes => [ ...
These are the first 10 lines, so there is no package declaration or anything.

How do i get to it's $doxydocs variable in a strict and warnings enabled way?

Comment on use dirty .pm
Select or Download Code
Re: use dirty .pm
by betterworld (Deacon) on Feb 21, 2005 at 10:23 UTC
    The only solution I can think of is something like
    use strict; use warnings; my $doxydocs = do "dirty.pm";
      If i do that, $doxydocs contains the value "1", and i still can't access the data. Even when i do this:
      my $a = do "$ARGV[0]/DoxyDocs.pm"; print Dumper($doxydocs), "\n";
      I get the error that $doxydocs is empty.
        In your example, $doxydocs is in fact empty, but $a is not. Try print Dumper($a)."\n";
Re: use dirty .pm
by PodMaster (Abbot) on Feb 21, 2005 at 10:35 UTC
    How do i get to it's $doxydocs variable in a strict and warnings enabled way?
    You require the file as usual, but before you do, you predeclare the variable(s), namely $doxydocs, using vars or our.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://432987]
Approved by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-04-17 22:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls