r29907 - in /branches/upstream/libemail-mime-creator-perl/current: Changes META.yml Makefile.PL README lib/Email/MIME/Creator.pm t/auto_create.t
emhn-guest at users.alioth.debian.org
emhn-guest at users.alioth.debian.org
Wed Jan 21 16:42:21 UTC 2009
Author: emhn-guest
Date: Wed Jan 21 16:42:06 2009
New Revision: 29907
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29907
Log:
[svn-upgrade] Integrating new upstream version, libemail-mime-creator-perl (1.455)
Modified:
branches/upstream/libemail-mime-creator-perl/current/Changes
branches/upstream/libemail-mime-creator-perl/current/META.yml
branches/upstream/libemail-mime-creator-perl/current/Makefile.PL
branches/upstream/libemail-mime-creator-perl/current/README
branches/upstream/libemail-mime-creator-perl/current/lib/Email/MIME/Creator.pm
branches/upstream/libemail-mime-creator-perl/current/t/auto_create.t
Modified: branches/upstream/libemail-mime-creator-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/Changes?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/Changes (original)
+++ branches/upstream/libemail-mime-creator-perl/current/Changes Wed Jan 21 16:42:06 2009
@@ -1,3 +1,9 @@
+Revision history for Email-MIME-Creator
+
+1.455 2009-01-20
+ fix a horrendous bug that would let you end up with:
+ Content-Type: image/jpeg; charset="utf-8"
+
1.454 2007-07-14
fix some spurious "Date" headers in badly-written tests
Modified: branches/upstream/libemail-mime-creator-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/META.yml?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/META.yml (original)
+++ branches/upstream/libemail-mime-creator-perl/current/META.yml Wed Jan 21 16:42:06 2009
@@ -1,18 +1,26 @@
--- #YAML:1.0
-name: Email-MIME-Creator
-version: 1.454
-abstract: Email::MIME constructor for starting anew
-license: perl
-generated_by: ExtUtils::MakeMaker version 6.32
-distribution_type: module
-requires:
- Email::MIME: 1.82
- Email::MIME::Modifier: 1.440
- Email::Simple: 1.92
- Email::Simple::Creator: 1.4
- Test::More: 0.47
+name: Email-MIME-Creator
+version: 1.455
+abstract: Email::MIME constructor for starting anew
+author:
+ - Ricardo SIGNES <rjbs at cpan.org>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ Email::MIME: 1.82
+ Email::MIME::Modifier: 1.440
+ Email::Simple: 1.92
+ Email::Simple::Creator: 1.4
+ Test::More: 0.47
+resources:
+ Repository: http://github.com/rjbs/email-mime-creator
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.48
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
-author:
- - Casey West <casey at geeknest.com>
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libemail-mime-creator-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/Makefile.PL?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/Makefile.PL (original)
+++ branches/upstream/libemail-mime-creator-perl/current/Makefile.PL Wed Jan 21 16:42:06 2009
@@ -1,7 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile (
- AUTHOR => 'Casey West <casey at geeknest.com>',
+ AUTHOR => 'Ricardo SIGNES <rjbs at cpan.org>',
ABSTRACT => "Email::MIME constructor for starting anew",
NAME => 'Email::MIME::Creator',
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
@@ -13,4 +13,12 @@
'Test::More' => '0.47',
},
VERSION_FROM => 'lib/Email/MIME/Creator.pm',
+ (eval { ExtUtils::MakeMaker->VERSION(6.46) }
+ ? (META_MERGE => {
+ resources => {
+ Repository => 'http://github.com/rjbs/email-mime-creator'
+ }
+ })
+ : ()
+ ),
);
Modified: branches/upstream/libemail-mime-creator-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/README?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/README (original)
+++ branches/upstream/libemail-mime-creator-perl/current/README Wed Jan 21 16:42:06 2009
@@ -1,116 +1,13 @@
-NAME
- Email::MIME::Creator - Email::MIME constructor for starting anew.
+README for Email-MIME-Creator 1.455
-SYNOPSIS
- use Email::MIME::Creator;
- use IO::All;
+This is a library to allow the creation of MIME messages from Perl data.
- # multipart message
- my @parts = (
- Email::MIME->create(
- attributes => {
- filename => "report.pdf",
- content_type => "application/pdf",
- encoding => "quoted-printable",
- name => "2004-financials.pdf",
- },
- body => io( "2004-financials.pdf" )->all,
- ),
- Email::MIME->create(
- attributes => {
- content_type => "text/plain",
- disposition => "attachment",
- charset => "US-ASCII",
- },
- body => "Hello there!",
- ),
- );
+Consult its POD for more information.
- my $email = Email::MIME->create(
- header => [ From => 'casey at geeknest.com' ],
- parts => [ @parts ],
- );
+To install:
- # nesting parts
- $email->parts_set(
- [
- $email->parts,
- Email::MIME->create( parts => [ @parts ] ),
- ],
- );
-
- # standard modifications
- $email->header_set( 'X-PoweredBy' => 'RT v3.0' );
- $email->header_set( To => rcpts() );
- $email->header_set( Cc => aux_rcpts() );
- $email->header_set( Bcc => sekrit_rcpts() );
+ perl Makefile.PL
+ make
+ make test
+ sudo make install
- # more advanced
- $_->encoding_set( 'base64' ) for $email->parts;
-
- # Quick multipart creation
- my $quicky = Email::MIME->create(
- header => [
- From => 'my at address',
- To => 'your at address',
- ],
- parts => [
- q[This is part one],
- q[This is part two],
- q[These could be binary too],
- ],
- );
-
- print $email->as_string;
-
- *rcpts = *aux_rcpts = *sekrit_rcpts = sub { 'you at example.com' };
-
-DESCRIPTION
- Methods
- create
- my $single = Email::MIME->create(
- header => [ ... ],
- attributes => { ... },
- body => '...',
- );
-
- my $multi = Email::MIME->create(
- header => [ ... ],
- attributes => { ... },
- parts => [ ... ],
- );
-
- This method creates a new MIME part. The "header" parameter is a
- lis of headers to include in the message. "attributes" is a hash of
- MIME attributes to assign to the part, and may override portions of
- the header set in the "header" parameter.
-
- The "parts" parameter is a list reference containing "Email::MIME"
- objects. Elements of the "parts" list can also be a non-reference
- string of data. In that case, an "Email::MIME" object will be
- created for you. Simple checks will determine if the part is binary
- or not, and all parts created in this fashion are encoded with
- "base64", just in case.
-
- "parts" takes precedence over "body", which will set this part's
- body if assigned. So, multi part messages shold use the "parts"
- parameter and single part messages should use "body".
-
- Back to "attributes". The hash keys correspond directly to methods
- or modifying a message from "Email::MIME::Modifier". The allowed
- keys are: content_type, charset, name, format, boundary, encoding,
- disposition, and filename. They will be mapped to "$attr\_set" for
- message modification.
-
-SEE ALSO
- Email::MIME, Email::MIME::Modifier, Email::Simple::Creator, "IO::All" or
- "File::Slurp" (for file slurping to create parts from strings), perl.
-
-AUTHOR
- Casey West, <casey at geeknest.com>.
-
-COPYRIGHT
- Copyright (c) 2004 Casey West. All rights reserved.
- This module is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
Modified: branches/upstream/libemail-mime-creator-perl/current/lib/Email/MIME/Creator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/lib/Email/MIME/Creator.pm?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/lib/Email/MIME/Creator.pm (original)
+++ branches/upstream/libemail-mime-creator-perl/current/lib/Email/MIME/Creator.pm Wed Jan 21 16:42:06 2009
@@ -2,7 +2,7 @@
use strict;
use vars qw[$VERSION];
-$VERSION = '1.454';
+$VERSION = '1.455';
use base q[Email::Simple::Creator];
use Email::MIME;
@@ -50,9 +50,22 @@
unless exists $headers{Date};
$CREATOR->_add_to_header(\$header, 'MIME-Version' => '1.0',);
+ my %attrs = $args{attributes} ? %{ $args{attributes} } : ();
+
+ # XXX: This is awful... but if we don't do this, then Email::MIME->new will
+ # end up calling parse_content_type($self->content_type) which will mean
+ # parse_content_type(undef) which, for some reason, returns the default.
+ # It's really sort of mind-boggling. Anyway, the default ends up being
+ # q{text/plain; charset="us-ascii"} so that if content_type is in the
+ # attributes, but not charset, then charset isn't changedand you up with
+ # something that's q{image/jpeg; charset="us-ascii"} and you look like a
+ # moron. -- rjbs, 2009-01-20
+ if (grep {exists $attrs{$_}} qw(content_type charset name format boundary)) {
+ $CREATOR->_add_to_header(\$header, 'Content-Type' => 'text/plain',);
+ }
+
my $email = $class->new($header);
- my %attrs = $args{attributes} ? %{ $args{attributes} } : ();
foreach (
qw[content_type charset name format boundary
encoding
@@ -206,9 +219,9 @@
L<http://emailproject.perl.org/wiki/Email::MIME::Creator>
-=head1 AUTHOR
-
-Casey West, <F<casey at geeknest.com>>.
+=head1 ORIGINAL AUTHOR
+
+B<Do not send bug reports to>: Casey West, <F<casey at geeknest.com>>.
=head1 COPYRIGHT
Modified: branches/upstream/libemail-mime-creator-perl/current/t/auto_create.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libemail-mime-creator-perl/current/t/auto_create.t?rev=29907&op=diff
==============================================================================
--- branches/upstream/libemail-mime-creator-perl/current/t/auto_create.t (original)
+++ branches/upstream/libemail-mime-creator-perl/current/t/auto_create.t Wed Jan 21 16:42:06 2009
@@ -3,7 +3,6 @@
$^W = 1;
use_ok 'Email::MIME::Creator';
-use Config;
my $email = Email::MIME->create(
header => [
More information about the Pkg-perl-cvs-commits
mailing list