Commits

Toby Inkster committed 88cb88b Draft

general updatedness; including RDF::RDFa::Parser changes

Comments (0)

Files changed (15)

 use XML::GRDDL;
 use LWP::Simple;
-use Data::Dumper;
-use RDF::TrineShortcuts;
+use RDF::TrineX::Functions -shortcuts;
 
 my $grddl = XML::GRDDL->new();
 my $url   = 'http://example.com/document.html';

examples/rubbish-example.pl

 use XML::GRDDL;
 use LWP::Simple;
-use Data::Dumper;
-use RDF::TrineShortcuts;
+use RDF::TrineX::Functions -shortcuts;
 
 my $grddl = XML::GRDDL->new();
 my $data  = {};
 package XML::GRDDL;
 
 use 5.008;
-use common::sense;
+use strict;
 use constant GRDDL_NS  => 'http://www.w3.org/2003/g/data-view#';
 use constant XHTML_NS  => 'http://www.w3.org/1999/xhtml';
 
 use Carp;
 use Data::UUID;
-use RDF::RDFa::Parser '1.09_10';
+use RDF::RDFa::Parser '1.097';
 use RDF::Trine qw[iri statement];
 use Scalar::Util qw[blessed];
 use URI;
 		$document = $parser->parse_string($document);
 	}
 	
-	my @transformations;
-	{
-		local $options{strings} = 0;
-		@transformations = $self->discover($document, $uri, %options);
-	}
-
 	my $model = RDF::Trine::Model->temporary_model;
+	my @transformations = $self->discover($document, $uri, %options, strings => 0);
 
 	foreach my $t (@transformations)
 	{
 		my $parser = XML::LibXML->new;
 		$document = $parser->parse_string($document);
 	}
-
+	
 	my @transformations;
 
 	push @transformations,
 {
 	my ($self, $document, $uri, %options) = @_;
 	my @transformations;
-	
+
 	my $profile_found = $options{'force_rel'};
 	
 	my $xpc = XML::LibXML::XPathContext->new;
 			my $config = RDF::RDFa::Parser::Config->new(
 				$type,
 				'1.1',
-				default_profiles => 'http://www.w3.org/2003/g/data-view',
-				);
+				initial_context => 'http://www.w3.org/2003/g/data-view',
+			);
 			my $parser = RDF::RDFa::Parser->new($document, $uri, $config);
 			return $parser->graph if $nocache;
 			$self->{'cached-rdf'}->{$uri} = $parser->graph;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/External.pm

 package XML::GRDDL::External;
 
 use 5.008;
-use common::sense;
+use strict;
 
 use XML::GRDDL;
 
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Namespace.pm

 package XML::GRDDL::Namespace;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::External];
+use strict;
+use base qw[XML::GRDDL::External];
 
 use RDF::Trine qw[iri];
 use Scalar::Util qw[blessed];
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Profile.pm

 package XML::GRDDL::Profile;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::External];
+use strict;
+use base qw[XML::GRDDL::External];
 
 use RDF::Trine qw[iri];
 use Scalar::Util qw[blessed];
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation.pm

 package XML::GRDDL::Transformation;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::External];
+use strict;
+use base qw[XML::GRDDL::External];
 
 use XML::GRDDL::Transformation::Hardcoded;
 use XML::GRDDL::Transformation::RDF_EASE;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation/Hardcoded.pm

 package XML::GRDDL::Transformation::Hardcoded;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::Transformation];
+use strict;
+use base qw[XML::GRDDL::Transformation];
 
 use HTTP::Headers;
 use HTTP::Response;
 };
 
 1;
+__END__
 
 =head1 NAME
 
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2011-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
 =cut

lib/XML/GRDDL/Transformation/Hardcoded/eRDF.pm

 package XML::GRDDL::Transformation::Hardcoded::eRDF;
 
 use 5.008;
-use common::sense;
-use parent qw[
+use strict;
+use base qw[
 	XML::GRDDL::Transformation::Hardcoded
 	XML::GRDDL::Transformation::XSLT_1
-	];
+];
 
 our $VERSION = '0.003';
 our $content;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+Ian Davis L<http://purl.org/NET/iand>.
+
+=head1 COPYRIGHT AND LICENCE
+
+Portions by Ian Davis, in the public domain.
 
 Copyright 2011-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
 =cut
 
 __DATA__

lib/XML/GRDDL/Transformation/RDF_EASE.pm

 package XML::GRDDL::Transformation::RDF_EASE;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::Transformation];
+use strict;
+use base qw[XML::GRDDL::Transformation];
 
 use Scalar::Util qw[blessed];
 use XML::GRDDL::Transformation::RDF_EASE::Functional qw[:standard];
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation/RDF_EASE/Functional.pm

 package XML::GRDDL::Transformation::RDF_EASE::Functional;
 
 use 5.008;
-use parent qw[Exporter];
-use common::sense;
+use base qw[Exporter];
+use strict;
 
 use CSS;
 use CSS::Parse::PRDGrammar;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
-Copyright 2008-2010 Toby Inkster
+Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation/RDF_EASE/Selector.pm

 package XML::GRDDL::Transformation::RDF_EASE::Selector;
 
 use 5.008;
-use common::sense;
+use strict;
 
 our $VERSION = '0.003';
 
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation/XSLT_1.pm

 package XML::GRDDL::Transformation::XSLT_1;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::Transformation];
+use strict;
+use base qw[XML::GRDDL::Transformation];
 
 use Scalar::Util qw[blessed];
 use XML::LibXML;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2008-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

lib/XML/GRDDL/Transformation/XSLT_2.pm

 package XML::GRDDL::Transformation::XSLT_2;
 
 use 5.008;
-use common::sense;
-use parent qw[XML::GRDDL::Transformation];
+use strict;
+use base qw[XML::GRDDL::Transformation];
 
 use Scalar::Util qw[blessed];
 use XML::LibXML;
 
 Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
 
-=head1 COPYRIGHT
+=head1 COPYRIGHT AND LICENCE
 
 Copyright 2010-2012 Toby Inkster
 
 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

meta/makefile.pret

 	perl_version_from m`XML::GRDDL`;
 	version_from      m`XML::GRDDL`;
 	readme_from       m`XML::GRDDL`;
-	requires          p`common::sense 0`;
 	requires          p`CSS 0`;
 	requires          p`CSS::Parse::PRDGrammar 0`;
 	requires          p`Data::UUID 0`;
 	requires          p`XML::LibXML 1.60`;
 	requires          p`XML::LibXSLT 0`;
 	recommends        p`XML::Saxon::XSLT2 0.003`;
-.
+.