Weird Module Interactions

Discussion in 'Perl Misc' started by roi.lists@gmail.com, Nov 21, 2005.

  1. Guest

    If I have a program with:

    use Module;
    use Fcntl;
    use POSIX;

    Where Module.pm is:

    package Module;
    use Fcntl;
    my $a = O_APPEND;
    1;

    I get:

    Subroutine main::O_APPEND redefined at /usr/lib/perl5/5.8.5/Exporter.pm
    line 65.
    at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/POSIX.pm line 19

    But when I exchange the "use Fcntl" and "use POSIX" lines, or drop the
    "use Module" line, the Error disappears.

    What gives?
     
    , Nov 21, 2005
    #1
    1. Advertising

  2. Sisyphus Guest

    <> wrote in message
    news:...
    > If I have a program with:
    >
    > use Module;
    > use Fcntl;
    > use POSIX;
    >
    > Where Module.pm is:
    >
    > package Module;
    > use Fcntl;
    > my $a = O_APPEND;
    > 1;
    >
    > I get:
    >
    > Subroutine main::O_APPEND redefined at /usr/lib/perl5/5.8.5/Exporter.pm
    > line 65.
    > at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/POSIX.pm line 19
    >
    > But when I exchange the "use Fcntl" and "use POSIX" lines, or drop the
    > "use Module" line, the Error disappears.
    >
    > What gives?
    >


    I don't know. For me, there's no problem with the code you have supplied -
    tested on perls 5.8.4, 5.8.5 and 5.8.7.

    Cheers,
    Rob
     
    Sisyphus, Nov 21, 2005
    #2
    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. ~~~ .NET Ed ~~~
    Replies:
    1
    Views:
    337
    Scott Allen
    Mar 21, 2005
  2. Replies:
    1
    Views:
    590
  3. Christian Blackburn
    Replies:
    7
    Views:
    1,016
    Mark Rae
    Jun 16, 2006
  4. Ian Witham

    Filemaker interactions

    Ian Witham, Aug 1, 2007, in forum: Python
    Replies:
    3
    Views:
    416
    M.-A. Lemburg
    Aug 25, 2007
  5. B. Chernick
    Replies:
    3
    Views:
    409
    B. Chernick
    Jan 25, 2008
Loading...

Share This Page