From: Tara L Andrews Date: Thu, 21 Apr 2011 10:12:26 +0000 (+0200) Subject: Change namespace X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e58153d6e15d5d21fb2c3fdc743487dceae06aa1;p=scpubgit%2Fstemmatology.git Change namespace --- diff --git a/lib/Traditions/Graph.pm b/lib/Text/Tradition/Graph.pm similarity index 96% rename from lib/Traditions/Graph.pm rename to lib/Text/Tradition/Graph.pm index 2c9efe8..125eded 100644 --- a/lib/Traditions/Graph.pm +++ b/lib/Text/Tradition/Graph.pm @@ -1,25 +1,25 @@ -package Traditions::Graph; +package Text::Tradition::Graph; use strict; use warnings; use Graph::Easy; use IPC::Run qw( run binary ); use Module::Load; -use Traditions::Graph::Position; +use Text::Tradition::Graph::Position; =head1 NAME -(Text?)::Traditions::Graph +Text::Tradition::Graph =head1 SYNOPSIS -use Traditions::Graph; +use Text::Tradition::Graph; -my $text = Traditions::Graph->new( 'GraphML' => '/my/graphml/file.xml' ); -my $text = Traditions::Graph->new( 'TEI' => '/my/tei/file.xml' ); -my $text = Traditions::Graph->new( 'CSV' => '/my/csv/file.csv', +my $text = Text::Tradition::Graph->new( 'GraphML' => '/my/graphml/file.xml' ); +my $text = Text::Tradition::Graph->new( 'TEI' => '/my/tei/file.xml' ); +my $text = Text::Tradition::Graph->new( 'CSV' => '/my/csv/file.csv', 'base' => '/my/basefile.txt' ); -my $text = Traditions::Graph->new( 'CTE' => '/my/cte/file.txt', +my $text = Text::Tradition::Graph->new( 'CTE' => '/my/cte/file.txt', 'base' => '/my/basefile.txt' ); my $svg_string = $text->as_svg(); @@ -96,7 +96,7 @@ sub new { bless( $self, $class ); # Now do the parsing. - my $mod = "Traditions::Parser::$format"; + my $mod = "Text::Tradition::Parser::$format"; load( $mod ); my @args = ( $opts{ $format } ); if( $format =~ /^(CSV|CTE)$/ ) { @@ -331,7 +331,7 @@ sub init_lemmatizer { sub make_positions { my( $self, $common_nodes, $paths ) = @_; - my $positions = Traditions::Graph::Position->new( $common_nodes, $paths ); + my $positions = Text::Tradition::Graph::Position->new( $common_nodes, $paths ); $self->{'positions'} = $positions; } diff --git a/lib/Traditions/Graph/Position.pm b/lib/Text/Tradition/Graph/Position.pm similarity index 98% rename from lib/Traditions/Graph/Position.pm rename to lib/Text/Tradition/Graph/Position.pm index 2679ebe..3544bfb 100644 --- a/lib/Traditions/Graph/Position.pm +++ b/lib/Text/Tradition/Graph/Position.pm @@ -1,11 +1,11 @@ -package Traditions::Graph::Position; +package Text::Tradition::Graph::Position; use strict; use warnings; =head1 NAME -Traditions::Graph::Position +Text::Tradition::Graph::Position =head1 SUMMARY diff --git a/lib/Traditions/Parser/BaseText.pm b/lib/Text/Tradition/Parser/BaseText.pm similarity index 99% rename from lib/Traditions/Parser/BaseText.pm rename to lib/Text/Tradition/Parser/BaseText.pm index e4bfd4a..e1867e9 100644 --- a/lib/Traditions/Parser/BaseText.pm +++ b/lib/Text/Tradition/Parser/BaseText.pm @@ -1,4 +1,4 @@ -package Traditions::Parser::BaseText; +package Text::Tradition::Parser::BaseText; use strict; use warnings; diff --git a/lib/Traditions/Parser/CSV.pm b/lib/Text/Tradition/Parser/CSV.pm similarity index 96% rename from lib/Traditions/Parser/CSV.pm rename to lib/Text/Tradition/Parser/CSV.pm index 7ad8a61..d3d19ca 100644 --- a/lib/Traditions/Parser/CSV.pm +++ b/lib/Text/Tradition/Parser/CSV.pm @@ -1,9 +1,9 @@ -package Traditions::Parser::CSV; +package Text::Tradition::Parser::CSV; use strict; use warnings; use Text::CSV::Simple; -use Traditions::Parser::BaseText qw( merge_base ); +use Text::Tradition::Parser::BaseText qw( merge_base ); # Takes a CSV file and a base text; returns a GraphML object. diff --git a/lib/Traditions/Parser/GraphML.pm b/lib/Text/Tradition/Parser/GraphML.pm similarity index 98% rename from lib/Traditions/Parser/GraphML.pm rename to lib/Text/Tradition/Parser/GraphML.pm index 4662296..f36bea2 100644 --- a/lib/Traditions/Parser/GraphML.pm +++ b/lib/Text/Tradition/Parser/GraphML.pm @@ -1,8 +1,7 @@ -package Traditions::Parser::GraphML; +package Text::Tradition::Parser::GraphML; use strict; use warnings; -use Traditions::Graph; use XML::LibXML; use XML::LibXML::XPathContext; diff --git a/lib/Traditions/Parser/TEI.pm b/lib/Text/Tradition/Parser/TEI.pm similarity index 100% rename from lib/Traditions/Parser/TEI.pm rename to lib/Text/Tradition/Parser/TEI.pm diff --git a/lib/Traditions/Schema.pm b/lib/Text/Tradition/Schema.pm similarity index 100% rename from lib/Traditions/Schema.pm rename to lib/Text/Tradition/Schema.pm diff --git a/lib/Traditions/Schema/Result/Collation.pm b/lib/Text/Tradition/Schema/Result/Collation.pm similarity index 100% rename from lib/Traditions/Schema/Result/Collation.pm rename to lib/Text/Tradition/Schema/Result/Collation.pm diff --git a/lib/Traditions/Schema/Result/Manuscript.pm b/lib/Text/Tradition/Schema/Result/Manuscript.pm similarity index 100% rename from lib/Traditions/Schema/Result/Manuscript.pm rename to lib/Text/Tradition/Schema/Result/Manuscript.pm diff --git a/lib/Traditions/Schema/Result/Reading.pm b/lib/Text/Tradition/Schema/Result/Reading.pm similarity index 100% rename from lib/Traditions/Schema/Result/Reading.pm rename to lib/Text/Tradition/Schema/Result/Reading.pm diff --git a/lib/Traditions/Schema/Result/Text.pm b/lib/Text/Tradition/Schema/Result/Text.pm similarity index 100% rename from lib/Traditions/Schema/Result/Text.pm rename to lib/Text/Tradition/Schema/Result/Text.pm