Permalink
Browse files

Load XML-Feed-0.09 into trunk.

  • Loading branch information...
1 parent ecac864 commit fe3b32012fc599df371eb22e12d5a14ae3b83478 @simonwistow simonwistow committed Apr 22, 2008
View
@@ -1,7 +1,13 @@
-# $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.
View
@@ -4,7 +4,7 @@ build_requires:
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:
@@ -22,4 +22,4 @@ requires:
URI::Fetch: 0
XML::Atom: 0.08
XML::RSS: 1.01
-version: 0.08
+version: 0.09
@@ -1,4 +1,4 @@
-#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
@@ -1,11 +1,11 @@
-#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 ();
@@ -20,6 +20,9 @@ my %ARGS =
process => "'PI',token0,text",
comment => "'C',text",
declaration => "'D',text",
+
+ # options that default on
+ unbroken_text => 1,
);
@@ -152,4 +155,4 @@ sub get_phrase {
__END__
-#line 341
+#line 367
View
@@ -1,4 +1,4 @@
-#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 $
@@ -1,12 +1,14 @@
-#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 = (
@@ -19,7 +21,8 @@ my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS );
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 {
@@ -92,7 +95,7 @@ sub import {
my $core_all;
print "*** $class version " . $class->VERSION . "\n";
- print "*** Checking for dependencies...\n";
+ print "*** Checking for Perl dependencies...\n";
my $cwd = Cwd::cwd();
@@ -690,7 +693,7 @@ sub _make_args {
$PostambleActions = (
$missing
? "\$(PERL) $0 --config=$config --installdeps=$missing"
- : "\@\$(NOOP)"
+ : "\$(NOECHO) \$(NOOP)"
);
return %args;
@@ -731,7 +734,7 @@ sub postamble {
return << ".";
config :: installdeps
-\t\@\$(NOOP)
+\t\$(NOECHO) \$(NOOP)
checkdeps ::
\t\$(PERL) $0 --checkdeps
@@ -747,4 +750,4 @@ installdeps ::
__END__
-#line 979
+#line 988
View
@@ -1,6 +1,22 @@
-#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';
@@ -12,11 +28,17 @@ BEGIN {
# 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:
@@ -35,21 +57,20 @@ use File::Path ();
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;
};
@@ -58,18 +79,18 @@ sub autoload {
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
@@ -95,18 +116,18 @@ sub preload {
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"};
};
}
}
@@ -124,30 +145,26 @@ sub new {
$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 {
@@ -173,13 +190,13 @@ END_DIE
}
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};
@@ -190,7 +207,7 @@ sub load_extensions {
next;
}
$self->{pathnames}{$pkg} = delete $INC{$file};
- push @{$self->{extensions}}, &{$new}($pkg, _top => $top_obj );
+ push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
}
$self->{extensions} ||= [];
@@ -203,26 +220,46 @@ sub find_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;
@found;
}
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;
@@ -1,10 +1,10 @@
-#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;
@@ -1,7 +1,7 @@
-#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 {
Oops, something went wrong.

0 comments on commit fe3b320

Please sign in to comment.