0

I'm using the Email::Stuffer module for sending a text message through an email in ActivePerl on Windows. This the code I'm running:

use strict;
use warnings;

use Email::Stuffer;

my $text = <<"END";
This is the email generated by Perl.
END

Email::Stuffer
     ->text_body($text)
     ->subject('Perl Email')
     ->from('[email protected]>')
     ->to('xyz@gmail)
     ->send;

I'm getting error like this:

Can't locate Email/Stuffer.pm in @INC (you may need to install the Email::Stuffer module) (@INC contains: C:/Perl/site/lib C:/Perl/lib) at D:\Ekanvith
a\perl\email.pl line 4.
BEGIN failed--compilation aborted at D:\Ekanvitha\perl\email.pl line 4.
2
  • 3
    Well, have you installed Email::Stuffer? Commented Jun 24, 2019 at 11:00
  • Find yourself a good Perl tutorial, perhaps one specifically for ActivePerl, and start there. Coming here to ask a question every time you get an error is not a Good Idea™ and it would take years just to learn the basics. Commented Jun 24, 2019 at 11:08

1 Answer 1

3

Email::Stuffer is not part of the standard Perl distribution. You need to install it before you can use it.

It's possible that it's available for installation in the ActivePerl package repository so you can install it using ppm. However, I would recommend using Strawberry Perl instead which would allow you to install CPAN modules using the standard tools.

Sign up to request clarification or add additional context in comments.

9 Comments

Is there any module for Activeperl because I have to run it on Activeperl only.
It's giving this error message ppm install failed: Can't find any package that provides Email::Stuffer
@Ekanvitha: Which version of ActivePerl are you using? The module seems to be available for most modern versions. Why are you tied to ActivePerl? Strawberry Perl is a better version and is actively supported by the Perl community.
@DaveCross, AP downloads offered are 5.26 and 5.28, corresponding PPM packages not ready yet?
@daxim: I'd put money on the problem being that this version of AP is too old, rather than too new :-)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.