-# $Id: Changes 1924 2006-03-03 17:34:15Z btrott $
+# $Id: Changes 1945 2006-07-11 03:31:58Z btrott $
Revision history for XML::Feed
+0.09 2006.07.10
+ - Fixed date format errors with XML::Feed::RSS. Thanks to Tatsuhiko
+ Miyagawa for the patch.
+ - Use add_module to properly add namespaces to the RSS document. Thanks
+ to Tatsuhiko Miyagawa for the patch.
+
0.08 2006.03.03
- $feed->author wasn't being converted properly by Feed->convert. Thanks
to Tatsuhiko Miyagawa for the patch.
HTML::TokeParser: 0
LWP: 0
distribution_type: module
-generated_by: Module::Install version 0.57
+generated_by: Module::Install version 0.61
license: perl
name: XML-Feed
no_index:
URI::Fetch: 0
XML::Atom: 0.08
XML::RSS: 1.01
-version: 0.08
+version: 0.09
-#line 1 "inc/ExtUtils/AutoInstall.pm - /Library/Perl/5.8.1/ExtUtils/AutoInstall.pm"
+#line 1
# $File: //member/autrijus/ExtUtils-AutoInstall/lib/ExtUtils/AutoInstall.pm $
# $Revision: #9 $ $Change: 9532 $ $DateTime: 2004/01/01 06:47:30 $ vim: expandtab shiftwidth=4
-#line 1 "inc/HTML/TokeParser.pm - /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level/HTML/TokeParser.pm"
+#line 1
package HTML::TokeParser;
-# $Id: TokeParser.pm,v 2.28 2003/10/14 10:11:05 gisle Exp $
+# $Id: TokeParser.pm,v 2.35 2005/12/02 16:08:17 gisle Exp $
require HTML::PullParser;
@ISA=qw(HTML::PullParser);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.28 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.35 $ =~ /(\d+)\.(\d+)/);
use strict;
use Carp ();
process => "'PI',token0,text",
comment => "'C',text",
declaration => "'D',text",
+
+ # options that default on
+ unbroken_text => 1,
);
__END__
-#line 341
+#line 367
-#line 1 "inc/LWP.pm - /Library/Perl/5.8.6/LWP.pm"
+#line 1
#
# $Id: LWP.pm,v 1.149 2005/12/08 12:06:22 gisle Exp $
-#line 1 "inc/Module/AutoInstall.pm - /Library/Perl/5.8.6/Module/AutoInstall.pm"
+#line 1
package Module::AutoInstall;
-$Module::AutoInstall::VERSION = '1.01';
use strict;
use Cwd ();
use ExtUtils::MakeMaker ();
-#line 218
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '1.02';
+}
# special map on pre-defined feature sets
my %FeatureMap = (
my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly );
my ( $PostambleActions, $PostambleUsed );
-_accept_default( !-t STDIN ); # see if it's a non-interactive session
+# See if it's a testing or non-interactive session
+_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN );
_init();
sub _accept_default {
my $core_all;
print "*** $class version " . $class->VERSION . "\n";
- print "*** Checking for dependencies...\n";
+ print "*** Checking for Perl dependencies...\n";
my $cwd = Cwd::cwd();
$PostambleActions = (
$missing
? "\$(PERL) $0 --config=$config --installdeps=$missing"
- : "\@\$(NOOP)"
+ : "\$(NOECHO) \$(NOOP)"
);
return %args;
return << ".";
config :: installdeps
-\t\@\$(NOOP)
+\t\$(NOECHO) \$(NOOP)
checkdeps ::
\t\$(PERL) $0 --checkdeps
__END__
-#line 979
+#line 988
-#line 1 "/Users/btrott/devel/cpan/xml-feed/inc/Module/Install.pm - /Library/Perl/5.8.6/Module/Install.pm"
+#line 1
package Module::Install;
+# For any maintainers:
+# The load order for Module::Install is a bit magic.
+# It goes something like this...
+#
+# IF ( host has Module::Install installed, creating author mode ) {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
+# 3. The installed version of inc::Module::Install loads
+# 4. inc::Module::Install calls "require Module::Install"
+# 5. The ./inc/ version of Module::Install loads
+# } ELSE {
+# 1. Makefile.PL calls "use inc::Module::Install"
+# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
+# 3. The ./inc/ version of Module::Install loads
+# }
+
use 5.004;
use strict 'vars';
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.57';
+ $VERSION = '0.61';
}
-# inc::Module::Install must be loaded first
-unless ( $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'} ) {
+# Whether or not inc::Module::Install is actually loaded, the
+# $INC{inc/Module/Install.pm} is what will still get set as long as
+# the caller loaded module this in the documented manner.
+# If not set, the caller may NOT have loaded the bundled version, and thus
+# they may not have a MI version that works with the Makefile.PL. This would
+# result in false errors or unexpected behaviour. And we don't want that.
+my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
+unless ( $INC{$file} ) {
die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
use FindBin;
*inc::Module::Install::VERSION = *VERSION;
-@inc::Module::Install::ISA = 'Module::Install';
+@inc::Module::Install::ISA = __PACKAGE__;
sub autoload {
- my $self = shift;
- my $caller = $self->_caller;
- my $cwd = Cwd::cwd();
- my $sym = "$caller\::AUTOLOAD";
-
+ my $self = shift;
+ my $who = $self->_caller;
+ my $cwd = Cwd::cwd();
+ my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
- $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller - $sym";
+ $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
};
sub import {
my $class = shift;
my $self = $class->new(@_);
+ my $who = $self->_caller;
unless ( -f $self->{file} ) {
require "$self->{path}/$self->{dispatch}.pm";
File::Path::mkpath("$self->{prefix}/$self->{author}");
- $self->{admin} =
- "$self->{name}::$self->{dispatch}"->new(_top => $self);
+ $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
$self->{admin}->init;
@_ = ($class, _self => $self);
goto &{"$self->{name}::import"};
}
- *{$self->_caller . "::AUTOLOAD"} = $self->autoload;
+ *{"${who}::AUTOLOAD"} = $self->autoload;
$self->preload;
# Unregister loader and worker packages so subdirs can use them again
my %seen;
foreach my $obj ( @exts ) {
while (my ($method, $glob) = each %{ref($obj) . '::'}) {
- next unless defined *{$glob}{CODE};
+ next unless exists &{ref($obj).'::'.$method};
next if $method =~ /^_/;
next if $method eq uc($method);
$seen{$method}++;
}
}
- my $caller = $self->_caller;
+ my $who = $self->_caller;
foreach my $name ( sort keys %seen ) {
- *{"${caller}::$name"} = sub {
- ${"${caller}::AUTOLOAD"} = "${caller}::$name";
- goto &{"${caller}::AUTOLOAD"};
+ *{"${who}::$name"} = sub {
+ ${"${who}::AUTOLOAD"} = "${who}::$name";
+ goto &{"${who}::AUTOLOAD"};
};
}
}
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
- $args{author} ||= '.author';
+ $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
$args{bundle} ||= 'inc/BUNDLES';
$args{base} ||= $base_path;
-
$class =~ s/^\Q$args{prefix}\E:://;
$args{name} ||= $class;
$args{version} ||= $class->VERSION;
-
unless ( $args{path} ) {
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
- bless(\%args, $class);
+ bless( \%args, $class );
}
sub call {
- my $self = shift;
- my $method = shift;
- my $obj = $self->load($method) or return;
-
- unshift @_, $obj;
- goto &{$obj->can($method)};
+ my ($self, $method) = @_;
+ my $obj = $self->load($method) or return;
+ splice(@_, 0, 2, $obj);
+ goto &{$obj->can($method)};
}
sub load {
}
sub load_extensions {
- my ($self, $path, $top_obj) = @_;
+ my ($self, $path, $top) = @_;
- unshift @INC, $self->{prefix}
- unless grep { $_ eq $self->{prefix} } @INC;
+ unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+ unshift @INC, $self->{prefix};
+ }
- local @INC = ($path, @INC);
- foreach my $rv ($self->find_extensions($path)) {
+ foreach my $rv ( $self->find_extensions($path) ) {
my ($file, $pkg) = @{$rv};
next if $self->{pathnames}{$pkg};
next;
}
$self->{pathnames}{$pkg} = delete $INC{$file};
- push @{$self->{extensions}}, &{$new}($pkg, _top => $top_obj );
+ push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
}
$self->{extensions} ||= [];
File::Find::find( sub {
my $file = $File::Find::name;
return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
- return if $1 eq $self->{dispatch};
+ my $subpath = $1;
+ return if lc($subpath) eq lc($self->{dispatch});
+
+ $file = "$self->{path}/$subpath.pm";
+ my $pkg = "$self->{name}::$subpath";
+ $pkg =~ s!/!::!g;
+
+ # If we have a mixed-case package name, assume case has been preserved
+ # correctly. Otherwise, root through the file to locate the case-preserved
+ # version of the package name.
+ if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+ open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
+ my $in_pod = 0;
+ while ( <PKGFILE> ) {
+ $in_pod = 1 if /^=\w/;
+ $in_pod = 0 if /^=cut/;
+ next if ($in_pod || /^=cut/); # skip pod text
+ next if /^\s*#/; # and comments
+ if ( m/^\s*package\s+($pkg)\s*;/i ) {
+ $pkg = $1;
+ last;
+ }
+ }
+ close PKGFILE;
+ }
- $file = "$self->{path}/$1.pm";
- my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
push @found, [ $file, $pkg ];
}, $path ) if -d $path;
}
sub _caller {
- my $depth = 0;
- my $caller = caller($depth);
-
- while ($caller eq __PACKAGE__) {
+ my $depth = 0;
+ my $call = caller($depth);
+ while ( $call eq __PACKAGE__ ) {
$depth++;
- $caller = caller($depth);
+ $call = caller($depth);
}
-
- $caller;
+ return $call;
}
1;
-#line 1 "inc/Module/Install/AutoInstall.pm - /Library/Perl/5.8.6/Module/Install/AutoInstall.pm"
+#line 1
package Module::Install::AutoInstall;
use Module::Install::Base;
@ISA = qw{Module::Install::Base};
-$VERSION = '0.57';
+$VERSION = '0.61';
use strict;
-#line 1 "inc/Module/Install/Base.pm - /Library/Perl/5.8.6/Module/Install/Base.pm"
+#line 1
package Module::Install::Base;
-$VERSION = '0.57';
+$VERSION = '0.61';
# Suspend handler for "redefined" warnings
BEGIN {
-#line 1 "inc/Module/Install/Build.pm - /Library/Perl/5.8.6/Module/Install/Build.pm"
+#line 1
package Module::Install::Build;
use Module::Install::Base;
@ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
+$VERSION = '0.61';
use strict;
-#line 1 "inc/Module/Install/Can.pm - /Library/Perl/5.8.6/Module/Install/Can.pm"
+#line 1
package Module::Install::Can;
-use Module::Install::Base;
-@ISA = qw(Module::Install::Base);
-
-$VERSION = '0.57';
-
use strict;
+use Module::Install::Base;
use Config ();
+### This adds a 5.005 Perl version dependency.
+### This is a bug and will be fixed.
+use File::Spec ();
use ExtUtils::MakeMaker ();
-# This may introduce a 5.005 dependency, or at the very least it may
-# not bootstrap properly under 5.004.
-use File::Spec ();
-
+use vars qw{$VERSION @ISA};
+BEGIN {
+ $VERSION = '0.61';
+ @ISA = qw{Module::Install::Base};
+}
+
+
# check if we can load some module
+### Upgrade this to not have to load the module if possible
sub can_use {
- my ($self, $mod, $ver) = @_;
- $mod =~ s{::|\\}{/}g;
- $mod .= ".pm" unless $mod =~ /\.pm$/i;
+ my ($self, $mod, $ver) = @_;
+ $mod =~ s{::|\\}{/}g;
+ $mod .= '.pm' unless $mod =~ /\.pm$/i;
- my $pkg = $mod;
- $pkg =~ s{/}{::}g;
- $pkg =~ s{\.pm$}{}i;
+ my $pkg = $mod;
+ $pkg =~ s{/}{::}g;
+ $pkg =~ s{\.pm$}{}i;
- local $@;
- eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+ local $@;
+ eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
# check if we can run some command
sub can_run {
- my ($self, $cmd) = @_;
+ my ($self, $cmd) = @_;
- my $_cmd = $cmd;
- return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
+ my $_cmd = $cmd;
+ return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
- for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
- my $abs = File::Spec->catfile($dir, $_[1]);
- return $abs if (-x $abs or $abs = MM->maybe_command($abs));
- }
+ for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+ my $abs = File::Spec->catfile($dir, $_[1]);
+ return $abs if (-x $abs or $abs = MM->maybe_command($abs));
+ }
- return;
+ return;
}
+# can we locate a (the) C compiler
sub can_cc {
- my $self = shift;
- my @chunks = split(/ /, $Config::Config{cc}) or return;
+ my $self = shift;
+ my @chunks = split(/ /, $Config::Config{cc}) or return;
- # $Config{cc} may contain args; try to find out the program part
- while (@chunks) {
- return $self->can_run("@chunks") || (pop(@chunks), next);
- }
+ # $Config{cc} may contain args; try to find out the program part
+ while (@chunks) {
+ return $self->can_run("@chunks") || (pop(@chunks), next);
+ }
- return;
+ return;
}
# Fix Cygwin bug on maybe_command();
-if ($^O eq 'cygwin') {
- require ExtUtils::MM_Cygwin;
- require ExtUtils::MM_Win32;
- if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
- *ExtUtils::MM_Cygwin::maybe_command = sub {
- my ($self, $file) = @_;
- if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
- ExtUtils::MM_Win32->maybe_command($file);
- }
- else {
- ExtUtils::MM_Unix->maybe_command($file);
- }
- }
- }
+if ( $^O eq 'cygwin' ) {
+ require ExtUtils::MM_Cygwin;
+ require ExtUtils::MM_Win32;
+ if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
+ *ExtUtils::MM_Cygwin::maybe_command = sub {
+ my ($self, $file) = @_;
+ if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+ ExtUtils::MM_Win32->maybe_command($file);
+ } else {
+ ExtUtils::MM_Unix->maybe_command($file);
+ }
+ }
+ }
}
1;
+
+__END__
+
+#line 157
-#line 1 "inc/Module/Install/Fetch.pm - /Library/Perl/5.8.6/Module/Install/Fetch.pm"
+#line 1
package Module::Install::Fetch;
+use strict;
use Module::Install::Base;
-@ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
+use vars qw{$VERSION @ISA};
+BEGIN {
+ $VERSION = '0.61';
+ @ISA = qw{Module::Install::Base};
+}
sub get_file {
my ($self, %args) = @_;
chdir $dir; return;
}
- my @dialog = split(/\n/, << ".");
+ my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
-.
+END_FTP
foreach (@dialog) { $fh->print("$_\n") }
$fh->close;
} }
-#line 1 "inc/Module/Install/Include.pm - /Library/Perl/5.8.6/Module/Install/Include.pm"
+#line 1
package Module::Install::Include;
use Module::Install::Base;
@ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
+$VERSION = '0.61';
use strict;
-#line 1 "inc/Module/Install/Makefile.pm - /Library/Perl/5.8.6/Module/Install/Makefile.pm"
+#line 1
package Module::Install::Makefile;
use strict 'vars';
use vars qw{$VERSION @ISA};
BEGIN {
- $VERSION = '0.57';
+ $VERSION = '0.61';
@ISA = qw{Module::Install::Base};
}
sub Makefile { $_[0] }
+my %seen = ();
+
sub prompt {
shift;
- goto &ExtUtils::MakeMaker::prompt;
+
+ # Infinite loop protection
+ my @c = caller();
+ if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+ die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+ }
+
+ # In automated testing, always use defaults
+ if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+ goto &ExtUtils::MakeMaker::prompt;
+ } else {
+ goto &ExtUtils::MakeMaker::prompt;
+ }
}
sub makemaker_args {
);
}
+sub realclean_files {
+ my $self = shift;
+ my $realclean = $self->makemaker_args->{realclean} ||= {};
+ %$realclean = (
+ %$realclean,
+ FILES => join(' ', grep length, $realclean->{FILES}, @_),
+ );
+}
+
sub libs {
my $self = shift;
my $libs = ref $_[0] ? shift : [ shift ];
die "&Makefile->write() takes no arguments\n" if @_;
my $args = $self->makemaker_args;
-
$args->{DISTNAME} = $self->name;
- $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
- $args->{VERSION} = $self->version || $self->determine_VERSION($args);
- $args->{NAME} =~ s/-/::/g;
-
- $args->{test} = {TESTS => $self->tests} if $self->tests;
-
+ $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
+ $args->{VERSION} = $self->version || $self->determine_VERSION($args);
+ $args->{NAME} =~ s/-/::/g;
+ if ( $self->tests ) {
+ $args->{test} = { TESTS => $self->tests };
+ }
if ($] >= 5.005) {
$args->{ABSTRACT} = $self->abstract;
- $args->{AUTHOR} = $self->author;
+ $args->{AUTHOR} = $self->author;
}
if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
$args->{NO_META} = 1;
}
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 ) {
- $args->{SIGN} = 1 if $self->sign;
+ if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ $args->{SIGN} = 1;
+ }
+ unless ( $self->is_admin ) {
+ delete $args->{SIGN};
}
- delete $args->{SIGN} unless $self->is_admin;
# merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
}
}
- if (my $perl_version = $self->perl_version) {
+ if ( my $perl_version = $self->perl_version ) {
eval "use $perl_version; 1"
- or die "ERROR: perl: Version $] is installed, ".
- "but we need version >= $perl_version";
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
}
- my %args = map {($_ => $args->{$_})} grep {defined($args->{$_})} keys %$args;
-
+ my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
if ($self->admin->preop) {
$args{dist} = $self->admin->preop;
}
- ExtUtils::MakeMaker::WriteMakefile(%args);
-
- $self->fix_up_makefile();
+ my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+ $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
}
sub fix_up_makefile {
- my $self = shift;
- my $top_class = ref($self->_top) || '';
- my $top_version = $self->_top->VERSION || '';
+ my $self = shift;
+ my $makefile_name = shift;
+ my $top_class = ref($self->_top) || '';
+ my $top_version = $self->_top->VERSION || '';
my $preamble = $self->preamble
- ? "# Preamble by $top_class $top_version\n" . $self->preamble
- : '';
- my $postamble = "# Postamble by $top_class $top_version\n" .
- ($self->postamble || '');
+ ? "# Preamble by $top_class $top_version\n"
+ . $self->preamble
+ : '';
+ my $postamble = "# Postamble by $top_class $top_version\n"
+ . ($self->postamble || '');
local *MAKEFILE;
- open MAKEFILE, '< Makefile' or die $!;
+ open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
my $makefile = do { local $/; <MAKEFILE> };
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+ $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+ $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
- $makefile =~ s/^(FULLPERL = .*)/$1 -Iinc/m;
- $makefile =~ s/^(PERL = .*)/$1 -Iinc/m;
+ # XXX - This is currently unused; not sure if it breaks other MM-users
+ # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
- open MAKEFILE, '> Makefile' or die $!;
- print MAKEFILE "$preamble$makefile$postamble" or die $!;
- close MAKEFILE or die $!;
+ open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ print MAKEFILE "$preamble$makefile$postamble" or die $!;
+ close MAKEFILE or die $!;
1;
}
__END__
-#line 295
+#line 324
-#line 1 "inc/Module/Install/Metadata.pm - /Library/Perl/5.8.6/Module/Install/Metadata.pm"
+#line 1
package Module::Install::Metadata;
use Module::Install::Base;
@ISA = qw{Module::Install::Base};
-$VERSION = '0.57';
+$VERSION = '0.61';
use strict 'vars';
while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
$self->feature( $name, @$mods );
}
- return @{ $self->{values}{features} };
+ return $self->{values}->{features}
+ ? @{ $self->{values}->{features} }
+ : ();
}
sub no_index {
-#line 1 "inc/Module/Install/Win32.pm - /Library/Perl/5.8.6/Module/Install/Win32.pm"
+#line 1
package Module::Install::Win32;
+use strict;
use Module::Install::Base;
-@ISA = qw(Module::Install::Base);
-
-$VERSION = '0.57';
-use strict;
+use vars qw{$VERSION @ISA};
+BEGIN {
+ $VERSION = '0.61';
+ @ISA = qw{Module::Install::Base};
+}
# determine if the user needs nmake, and download it if needed
sub check_nmake {
- my $self = shift;
- $self->load('can_run');
- $self->load('get_file');
-
- require Config;
- return unless (
- $Config::Config{make} and
- $Config::Config{make} =~ /^nmake\b/i and
- $^O eq 'MSWin32' and
- !$self->can_run('nmake')
- );
-
- print "The required 'nmake' executable not found, fetching it...\n";
-
- require File::Basename;
- my $rv = $self->get_file(
- url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
- ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
- local_dir => File::Basename::dirname($^X),
- size => 51928,
- run => 'Nmake15.exe /o > nul',
- check_for => 'Nmake.exe',
- remove => 1,
- );
-
- if (!$rv) {
- die << '.';
+ my $self = shift;
+ $self->load('can_run');
+ $self->load('get_file');
+
+ require Config;
+ return unless (
+ $^O eq 'MSWin32' and
+ $Config::Config{make} and
+ $Config::Config{make} =~ /^nmake\b/i and
+ ! $self->can_run('nmake')
+ );
+
+ print "The required 'nmake' executable not found, fetching it...\n";
+
+ require File::Basename;
+ my $rv = $self->get_file(
+ url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
+ ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
+ local_dir => File::Basename::dirname($^X),
+ size => 51928,
+ run => 'Nmake15.exe /o > nul',
+ check_for => 'Nmake.exe',
+ remove => 1,
+ );
+
+ if (!$rv) {
+ die <<'END_MESSAGE';
-------------------------------------------------------------------------------
You may then resume the installation process described in README.
-------------------------------------------------------------------------------
-.
- }
+END_MESSAGE
+ }
}
1;
-
-__END__
-
-#line 1 "inc/Module/Install/WriteAll.pm - /Library/Perl/5.8.6/Module/Install/WriteAll.pm"
+#line 1
package Module::Install::WriteAll;
use Module::Install::Base;
@ISA = qw(Module::Install::Base);
-$VERSION = '0.57';
+$VERSION = '0.61';
use strict;
-# $Id: Feed.pm 1920 2006-02-28 00:00:56Z btrott $
+# $Id: Feed.pm 1927 2006-03-07 02:29:25Z btrott $
package XML::Feed;
use strict;
use URI::Fetch;
use Carp;
-our $VERSION = '0.08';
+our $VERSION = '0.09';
sub new {
my $class = shift;
-# $Id: RSS.pm 1917 2006-02-07 07:11:44Z btrott $
+# $Id: RSS.pm 1934 2006-04-22 05:13:55Z btrott $
package XML::Feed::RSS;
use strict;
my $feed = shift;
eval "use $PREFERRED_PARSER"; die $@ if $@;
$feed->{rss} = $PREFERRED_PARSER->new( version => '2.0' );
+ $feed->{rss}->add_module(prefix => "content", uri => 'http://purl.org/rss/1.0/modules/content/');
+ $feed->{rss}->add_module(prefix => "dcterms", uri => 'http://purl.org/rss/1.0/modules/dcterms/');
$feed;
}
## this date is formatted for an RSS 1.0 feed. So it's commented out.
#$rss->channel->{dc}{date} =
# DateTime::Format::W3CDTF->format_datetime($_[0]);
- } else {
- if (my $ts = $rss->channel('pubDate')) {
- return DateTime::Format::Mail->parse_datetime($ts);
- } elsif ($ts = $rss->channel->{dc}{date}) {
- return DateTime::Format::W3CDTF->parse_datetime($ts);
- }
+ } else {
+ my $date;
+ eval {
+ if (my $ts = $rss->channel('pubDate')) {
+ $date = DateTime::Format::Mail->parse_datetime($ts);
+ } elsif ($ts = $rss->channel->{dc}{date}) {
+ $date = DateTime::Format::W3CDTF->parse_datetime($ts);
+ }
+ };
+ return $date;
}
}
## Because of the logic below, we need to add some dummy content,
## so that we'll properly recognize the description we enter as
## the summary.
- if (!$item->{'http://purl.org/rss/1.0/modules/content/'}{encoded} &&
+ if (!$item->{content}{encoded} &&
!$item->{'http://www.w3.org/1999/xhtml'}{body}) {
- $item->{'http://purl.org/rss/1.0/modules/content/'}{encoded} = ' ';
+ $item->{content}{encoded} = ' ';
}
} else {
## Some RSS feeds use <description> for a summary, and some use it
## typically used for the full content, use <description> as summary.
my $txt;
if ($item->{description} &&
- ($item->{'http://purl.org/rss/1.0/modules/content/'}{encoded} ||
+ ($item->{content}{encoded} ||
$item->{'http://www.w3.org/1999/xhtml'}{body})) {
$txt = $item->{description};
}
my $item = shift->{entry};
if (@_) {
my $c = ref($_[0]) eq 'XML::Feed::Content' ? $_[0]->body : $_[0];
- $item->{'http://purl.org/rss/1.0/modules/content/'}{encoded} = $c;
+ $item->{content}{encoded} = $c;
} else {
my $body =
- $item->{'http://purl.org/rss/1.0/modules/content/'}{encoded} ||
+ $item->{content}{encoded} ||
$item->{'http://www.w3.org/1999/xhtml'}{body} ||
$item->{description};
XML::Feed::Content->wrap({ type => 'text/html', body => $body });
sub modified {
my $item = shift->{entry};
if (@_) {
- $item->{'http://purl.org/rss/1.0/modules/dcterms/'}{modified} =
+ $item->{dcterms}{modified} =
DateTime::Format::W3CDTF->format_datetime($_[0]);
} else {
- if (my $ts = $item->{'http://purl.org/rss/1.0/modules/dcterms/'}{modified}) {
+ if (my $ts = $item->{dcterms}{modified}) {
return eval { DateTime::Format::W3CDTF->parse_datetime($ts) };
}
}
# $Id$
use strict;
-use Test::More tests => 66;
+use Test::More tests => 69;
use XML::Feed;
use XML::Feed::Entry;
use XML::Feed::Content;
my @e = $feed->entries;
is(scalar @e, 1, 'One post in the feed');
is($e[0]->title, 'Foo Bar', 'Correct post');
+ is($e[0]->content->body, 'This is the content (again).', 'content is still correct');
+
+ if ($format eq 'Atom') {
+ like $feed->as_xml, qr/This is the content/;
+ }
}