Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hello jamroll,

Your description is very open, you are saying that you have all these modules that you are trying to call. Did you implement all these modules yours self? Do you have a main script eg. main.pl that calls the modules in the directory?

For example pseudo code main.pl

#!usr/bin/perl use strict; use warnings; use pm::security; print banned(...); # This is how you are calling the method and you ar +e getting the error?

How you export your methods? Have you read Simple Module Tutorial

We need to see at least one module and how you have define it, how you are calling it and see why you are not able to access your methods.

Provide us all these data with well formatted output and we will be more that happy to provide assistance.

Update: Sample of your module to get you started:

Perl module (Security.pm) inside your directory Pm. Path to the module is (local dir of main.pl module Pm/Security.pm)

package Pm::Security; use strict; use warnings; use Exporter; use vars qw($VERSION @ISA @EXPORT_OK); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT_OK = qw(banned); sub banned { return reverse @_ } 1;

Main module (main.pl)

#!usr/bin/perl use say; use strict; use warnings; use Pm::Security qw( banned ); # use Benchmark qw(:all) ; # WindowsOSn # use Benchmark::Forking qw( timethese cmpthese ); my @list = qw (First ~ Second); say banned( @list ); __END__ $ perl main.pl Second~First

Hope this helps, BR

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: Perl Modules by thanos1983
in thread Perl Modules by jamroll

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-03-19 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found