in reply to Re: Which method do I use to install a module ?
in thread Which method do I use to install a module ?

Hi Dave,

Thanks for that, the install using PPM worked okay, the first part was the "C Parser", then the final line said

Successfully installed Mail-Box version 2.048 in ActivePerl 5.8.0.806.

Now there are a heap of messages being produced like this

Compilation failed in require at D:/Perl/site/lib/Mail/Box.pm line 10. BEGIN failed--compilation aborted at D:/Perl/site/lib/Mail/Box.pm line + 10. Compilation failed in require at chkemail.pl line 5. BEGIN failed--compilation aborted at chkemail.pl line 5.

Is there any way I can pipe these messages to a file ? I tried

perl chkemail.pl >chkemail.lis

but the o/p file is empty

Peter

Replies are listed 'Best First'.
Re: Re: Re: Which method do I use to install a module ?
by davido (Cardinal) on Nov 12, 2003 at 11:36 UTC
    In looking at the POD for Mail::Box here I see that Mail::Box "is a" Mail::Reporter (inherets from). That leads me to believe you should also install the Mail::Reporter module in the same way you installed Mail::Box. Also, in looking at the documentation, the synopsis only shows Mail::Box being invoked as "use Mail::Box::Manager". I'm not sure why that is the case, not having used the module myself. But I suspect that the key is found in the Mail::Box Overview POD page, which is strongly recommended reading according to the POD for Mail::Box. (One of those "You did read that, didn't you?" type of statements indicates the strong recommendation). ...You did read that, right? ;)

    Maybe something in all that will tell you better what you're doing wrong.

    Also, to answer your followup question directly, you may spill error messages to another file but to catch compilation errors you would probably have to redirect STDERR to a file within a BEGIN block. But redirecting STDERR isn't really what you need to be concerned with. First, figure out what you need to do to use Mail::Box so that it doesn't generate errors. The key to your success in using CPAN modules is to read their documentation thoroughly. The small amount of time it takes to read the POD's for the modules is a very slight price to pay in comparison to the time you're saving by not having to write the module's code from scratch yourself.


    Dave


    "If I had my life to live over again, I'd be a plumber." -- Albert Einstein
      Dave,

      In looking at the POD for Mail::Box here I see that Mail::Box "is a" Mail::Reporter (inherets from). That leads me to believe you should also install the Mail::Reporter module in the same way you installed Mail::Box.

      The install didn't work

      ppm> install Mail-Reporter Error: Package 'Mail-Reporter' not found. Please 'search' for it first +. ppm> install Mail-Box-Manager Error: Package 'Mail-Box-Manager' not found. Please 'search' for it first.

      However, when I look at what is included in the tar file (Mail-Box-2.051), I can see files 'reporter.pm' and 'reporter.pod' under the /Mail path, and also I can see files 'manager.pm' and 'manager.pod' under the /Mail/Box path

      Does that indicate that I should have used "option 3" instead of using PPM ?

      Where is PPM actually looking ? I know it goes out to the Internet, but is there a setting to force it to search in URL's that would contain these modules ?

      Peter

        When I check the ActiveState website for Mail::Box at this link I see Mail::Box v2.012 listed as being available.

        And when I type "search Mail-Box" at the ppm> prompt I get the following hits:

        Searching in Active Repositories 1. Mail-Box [2.048] E-mail handling 2. Mail-Box-Parser-C [3.003] C parser for Mail::Box

        I don't feel any burning desire to install it on my system, so that's as far as I can go toward helping you on the issue. Make sure that you address your questions in Seekers of Perl Wisdom to the community at large, and not just to me. You will get farther with the help of the collective wisdom of the monastery rather than my hit-and-miss experience.

        You may check to ensure that you've got a recent version of ActiveState Perl, and of ppm. And check to see that the module repository list is up to date. ...how to do that, I have to leave you to figure out. ;)

        Hope that this gets you going in the right direction....


        Dave


        "If I had my life to live over again, I'd be a plumber." -- Albert Einstein