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

How to print out package code ?

by Martin90 (Sexton)
on Mar 18, 2013 at 18:49 UTC ( [id://1024120]=perlquestion: print w/replies, xml ) Need Help??

Martin90 has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I wonder how to print out code from the package ? I want to see what exactly is included to my script by "use Module_Name". Thanks for help.

Replies are listed 'Best First'.
Re: How to print out package code ?
by toolic (Bishop) on Mar 18, 2013 at 19:03 UTC
    perldoc can locate your .pm file and show you its contents (if that's what you mean):
    perldoc -m Module_Name
      I don't know how exactly do this, my method below doesn't work and return "Bareword "MODULE" not allowed while "strict subs"" Maybe you have better approach ?
        You cannot print a bareword handle. You want to print the line read from the handle, therefore:
        print X $_;
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found