Perl module question

Discussion in 'Perl' started by Eddie, Oct 9, 2004.

  1. Eddie

    Eddie Guest

    Hi,

    I wanted to test all the subroutines in my module from a script,
    but I have a problem. Some subroutines are called from only
    inside the module and some are not. Therefore I have code
    like:

    1 my ($pkg, @args) = @_
    and
    2 my @args = @_

    in other places. Unfortunately if i test my sub routine that has #2 above,
    I get an error because the package name is passed into the sub and the code
    isnt
    expecting that. Is there a way that a script can call a method in a module
    and not
    pass the package name?

    Thanks,

    Eddie
     
    Eddie, Oct 9, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mothra
    Replies:
    5
    Views:
    485
    Dennis Lee Bieber
    Apr 15, 2005
  2. Maric Michaud
    Replies:
    0
    Views:
    7,196
    Maric Michaud
    Jun 24, 2006
  3. Replies:
    2
    Views:
    519
    Paul Lalli
    Feb 6, 2006
  4. Replies:
    4
    Views:
    143
    Ted Zlatanov
    Feb 10, 2009
  5. Thomas Steinbach

    Install a perl module to the main perl lib dir

    Thomas Steinbach, Feb 13, 2009, in forum: Perl Misc
    Replies:
    1
    Views:
    115
    Larry Gates
    Feb 13, 2009
Loading...

Share This Page