Loading ...
Sorry, an error occurred while loading the content.

Modules

Expand Messages
  • Gordon Stewart
    Hi - Does anyone know of the way to turn a cgi file into a module ? As per my message of yesterday - no reply as yet. Basically, I need to give the module 6
    Message 1 of 3 , Aug 20, 2001
    • 0 Attachment
      Hi - Does anyone know of the way to turn a cgi file into a module ?

      As per my message of yesterday - no reply as yet.

      Basically, I need to 'give' the module 6 numbers..

      The module processes the numbers, & returns a single number.

      The 1st CGI - then uses that number to do whatever...

      I know how its done - But i dont know how to 'give' the number to the moidule, & get it back again.

      any ideas ?

      G.
    • erik.tank@bpxinternet.com
      If you are trying to create a module then decide on a name for the module and type the following: h2xs -XAn my::module::name The h2xs command will create the
      Message 2 of 3 , Aug 21, 2001
      • 0 Attachment
        If you are trying to create a module then decide on a name for the module
        and type the following:
        h2xs -XAn my::module::name

        The h2xs command will create the directory my/module/name from the current
        directory and place all the files you need in that directory. All you need
        to do it put your code into name.pm (which h2xs has created for you).

        One word of advice: I would highly recommend that the module should be OO.
        This is my preference, but you can do whatever you want.

        After you have installed the module on your system you can use it as you do
        any other modules.
        use my::module::name;

        If the module is OO then you would/could proceed like this:
        my $object = my::module::name->new();
        $object->set_vars(1,2,3,4,5,6);
        my $result = $object->get_result();

        Of course the above code is only possible if you created new(), set_vars(),
        and get_results() functions in the module.

        This is a really broad topic (because Perl allows you to do it in many
        different ways) so I hope that I have given you some useful info to start
        with.

        Erik Tank
        602-817-4705
        erik.tank@...


        -----Original Message-----
        From: Gordon Stewart [mailto:Gordon.Stewart@...]
        Sent: Monday, August 20, 2001 8:40 PM
        To: perl-beginner@yahoogroups.com
        Subject: [PBML] Modules



        Hi - Does anyone know of the way to turn a cgi file into a module ?

        As per my message of yesterday - no reply as yet.

        Basically, I need to 'give' the module 6 numbers..

        The module processes the numbers, & returns a single number.

        The 1st CGI - then uses that number to do whatever...

        I know how its done - But i dont know how to 'give' the number to the
        moidule, & get it back again.

        any ideas ?

        G.








        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • gordon stewart
        Hi there... When i write to a file, If i open it in a CGI directory, I can write to it al-right, but I cant write/open a file in my main HTML directory. Has
        Message 3 of 3 , Sep 2, 2001
        • 0 Attachment
          Hi there...

          When i 'write' to a file, If i open it in a CGI
          directory, I can write to it al-right, but I cant
          write/open a file in my main HTML directory.

          Has anyone come accross this & how do you over-come
          this ?

          G.


          =====
          G. Stewart
          New Zealand chat & Discussion group email
          new_zealand-help@yahoogroups.com for details.

          http://travel.yahoo.com.au - Yahoo! Travel
          - Got Itchy feet? Get inspired!
        Your message has been successfully submitted and would be delivered to recipients shortly.