Commits

Konstantin Baierer  committed 364356e

dropped the rdf::rdfa::parser requirement

  • Participants
  • Parent commits b188cdd

Comments (0)

Files changed (5)

         # 'MooseX::Unique' => '0.005',
         'LWP::UserAgent' => 0,
         'Scalar::Util' => 0,
-        'Set::Object' => 1.28,
+        'Set::Object' => '1.28',
         'URI' => 0,
         'RDF::NS' => '20111124',
+        'MooseX::HasDefaults' => '0.03',
 
         # 'perl'          => '5.6.1',
         # 'Some::Module'  => '1.23',
 lib/Moose/Meta/Attribute/Custom/Trait/Semantic.pm
 lib/MooseX/Semantic.pm
 lib/MooseX/Semantic/Meta/Attribute/Trait.pm
+lib/MooseX/Semantic/Role/Graph.pm
+lib/MooseX/Semantic/Role/PortableResource.pm
 lib/MooseX/Semantic/Role/RdfBackend.pm
 lib/MooseX/Semantic/Role/RdfExport.pm
 lib/MooseX/Semantic/Role/RdfImport.pm
 lib/MooseX/Semantic/Test.pm
 lib/MooseX/Semantic/Test/BackendPerson.pm
 lib/MooseX/Semantic/Test/MetaPerson.pm
+lib/MooseX/Semantic/Test/ModelContainingPerson.pm
 lib/MooseX/Semantic/Test/Person.pm
 lib/MooseX/Semantic/Test/StrictPerson.pm
 lib/MooseX/Semantic/Types.pm
 t/data/toby_inkster.ttl
 t/rdf_backend/role_rdfbackend.t
 t/rdf_export/basic.t
+t/rdf_export/graph.t
 t/rdf_export/rdf_endpoint.t
 t/rdf_export/to_hash.t
 t/rdf_import/blank_node.t
 t/rdf_import/rdf_import.t
 t/rdf_import/rdf_import_all_synopsis.t
 t/rdf_import/subtyped.t
+t/rdf_resource.t
 t/rdf_type.t
 t/role_obsolescence.t
 t/role_withrdftype.t

File lib/MooseX/Semantic/Meta/Attribute/Trait.pm

 use Moose::Role;
 use MooseX::Semantic::Types qw(TrineResource ArrayOfTrineResources);
 use Data::Dumper;
-
+with ( 'MooseX::HasDefaults::Meta::IsRW' );
 =head1 NAME
 
 MooseX::Semantic::Meta::Attribute::Trait - Attribute trait for semantic attributes
 
 =cut
 
+=head1 DESCRIPTION
+
+Attributes that apply the C<Semantic> trait can be extended using the attributes listed below.
+
+By default, all Semantic attributes are read-write, i.e. C<is => 'rw'>.
+
 =head1 ATTRIBUTES
 
 =cut
     default => sub {sub{ return $_[0] }},
 );
 
+has 'is' => (
+    is => 'rw',
+    default => 'rw',
+);
+
 1;
 =head1 AUTHOR
 

File lib/MooseX/Semantic/Role/RdfImport.pm

     my $cls = shift;
     my ($uri) = @_;
 
-    # my $rdfa = RDF::RDFa::Parser->new_from_url($uri);
-    # my $model = $rdfa->graph;
     my $model = RDF::Trine::Model->temporary_model;
     RDF::Trine::Parser->parse_url_into_model( $uri, $model );
     return $cls->new_from_model( $model, $uri );

File t/rdf_resource.t

     package SemTest;
     use Moose;
     with qw(MooseX::Semantic::Role::Resource);
+    has foo => (
+        # is => 'rw' ,
+        traits => ['Semantic'],
+        uri => 'http://bar.baz/foo',
+    );
 }
 
 my $t1 = SemTest->new();