Composite "+memberName+
+ out.print("Composite "+ memberName +
" ("+(isOptional?"optional, ":"")+ datatype + "): | ");
for(Map.Entry subpart: subparts.entrySet()){
- writeDataType(out, subpart.getKey(), subpart.getValue(), msg2Parts, prefix+memberName+":");
+ writeDataType(out, subpart.getKey(), subpart.getValue(), type2Parts, type2Parts, prefix+memberName+":");
}
out.print(" | \n");
}
From kawas at dev.open-bio.org Thu Aug 27 15:37:37 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 27 Aug 2009 15:37:37 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908271937.n7RJbbl6005812@dev.open-bio.org>
kawas
Thu Aug 27 15:37:37 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv5776/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service-base.tt
Log Message:
fix the warning 'unsuccesful stat on file containing newline' when sending raw data
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service-base.tt,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2008/02/21 00:12:55 1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2009/08/27 19:37:37 1.4
@@ -112,7 +112,9 @@
Log::Log4perl::NDC->push ($$);
$LOG->info ('*** REQUEST START *** ' . $self->log_request);
+ no warnings 'newline';
my $in_testing_mode = (-f $data);
+ use warnings 'newline';
if ($LOG->is_debug) {
if ($in_testing_mode) {
open (RAWXML, "<$data") or $LOG->logdie ("Cannot open $data: $!\n");
From kawas at dev.open-bio.org Thu Aug 27 15:39:26 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 27 Aug 2009 15:39:26 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908271939.n7RJdQCb005925@dev.open-bio.org>
kawas
Thu Aug 27 15:39:26 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def
In directory dev.open-bio.org:/tmp/cvs-serv5890/MOSES-MOBY/lib/MOSES/MOBY/Def
Modified Files:
Service.pm
Log Message:
added missing categories
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Service.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2008/04/29 19:41:38 1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2009/08/27 19:39:26 1.5
@@ -260,7 +260,7 @@
sub _check_category {
my ($self, $attr) = @_;
$self->throw ('Invalid service category: ' . $self->category)
- unless $self->category =~ /^cgi|wsdl|moby|moby\-async|post$/i;
+ unless $self->category =~ /^cgi|wsdl|moby|moby\-async|post|cgi\-async$/i;
}
1;
From kawas at dev.open-bio.org Thu Aug 27 15:40:50 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 27 Aug 2009 15:40:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908271940.n7RJeoVe006003@dev.open-bio.org>
kawas
Thu Aug 27 15:40:50 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv5968/MOSES-MOBY/lib/MOSES/MOBY/Cache
Modified Files:
Central.pm
Log Message:
made relationship regex check case insensitive and less stringent.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/06/04 16:14:31 1.7
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2009/08/27 19:40:50 1.8
@@ -708,13 +708,13 @@
while ( $count > 0 ) {
my $node = $nodes->get_node( $count-- );
my $relationship = $node->getAttribute('relationshipType');
- if ( $relationship =~ /.*:isa$/ ) {
+ if ( $relationship =~ /^.*isa$/i ) {
my $parent = $node->getChildrenByTagName('objectType');
my $isa = $parent->get_node(1)->textContent
if ( $parent and $parent->get_node(1) and $parent->get_node(1) );
$datatype->parent($isa);
}
- elsif ( $relationship =~ /.*:hasa$/ ) {
+ elsif ( $relationship =~ /^.*hasa$/i ) {
my $pNode = $node->getChildrenByTagName('objectType');
for ( my $i = 1 ; $i <= $pNode->size() ; $i++ ) {
my $article = $pNode->get_node($i)->getAttribute('articleName')
@@ -735,7 +735,7 @@
);
}
}
- elsif ( $relationship =~ /.*:has$/ ) {
+ elsif ( $relationship =~ /^.*has$/i ) {
my $pNode = $node->getChildrenByTagName('objectType');
for ( my $i = 1 ; $i <= $pNode->size() ; $i++ ) {
my $article = $pNode->get_node($i)->getAttribute('articleName')
From kawas at dev.open-bio.org Thu Aug 27 15:44:40 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 27 Aug 2009 15:44:40 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908271944.n7RJidME006047@dev.open-bio.org>
kawas
Thu Aug 27 15:44:39 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv6008/MOSES-MOBY
Modified Files:
Makefile.PL Changes
Log Message:
updated to reflect current status of the module.
moby-live/Perl/MOSES-MOBY Makefile.PL,1.17,1.18 Changes,1.16,1.17
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/05/22 16:38:39 1.17
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/08/27 19:44:39 1.18
@@ -6,7 +6,7 @@
# Define metadata
name 'MOSES-MOBY';
- version '0.90';
+ version '0.91';
license 'perl';
abstract
'This distribution aids in the creation of BioMOBY perl based web services.';
@@ -17,7 +17,7 @@
requires 'CGI' => 0;
requires 'File::Spec' => 0.80;
requires 'SOAP::Lite' => 0.69;
- requires 'XML::LibXML::Common' => '0.13';
+ requires 'XML::LibXML::Common' => 0.13;
requires 'XML::LibXML' => 1.62;
requires 'Log::Log4perl' => 1.12;
requires 'Template' => 1.11;
@@ -25,15 +25,15 @@
requires 'IO::String' => 1.08;
requires 'Unicode::String' => 2.09;
requires 'File::HomeDir' => 0.65;
- requires 'File::ShareDir' => 0.05;
+ requires 'File::ShareDir' => 1.00;
requires 'Class::Inspector' => 1.17;
requires 'Params::Util' => 0.38;
requires 'HTTP::Date' => 5.81;
# windows doesn't need this
if ( not MSWIN ) {
- requires 'Want' => '0.18';
- requires 'IO::Prompt' => '0.99.2';
+ requires 'Want' => 0.18;
+ requires 'IO::Prompt' => 0.99.2;
}
# for async services
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/05/22 16:38:39 1.16
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/08/27 19:44:39 1.17
@@ -3,6 +3,11 @@
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
+ - bug fix: fixed the unsuccessful stat on filename
+ warning in service-base.tt
+ - updated the categories in Service.pm
+ - updated Makefile.PL to reflect dependency upgrades
+ and versioning
.90
- bug fix: when sending data with newlines on
a WinOS, \r was causing problems with the
From gordonp at dev.open-bio.org Thu Aug 27 17:37:33 2009
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Thu, 27 Aug 2009 17:37:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908272137.n7RLbX32006322@dev.open-bio.org>
gordonp
Thu Aug 27 17:37:32 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services
In directory dev.open-bio.org:/tmp/cvs-serv6286/src/main/ca/ucalgary/services
Modified Files:
SoapServlet.java
Log Message:
Further element reference fixes for WSDL XML schema definitions
moby-live/Java/src/main/ca/ucalgary/services SoapServlet.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java 2009/08/26 22:02:18 1.6
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java 2009/08/27 21:37:32 1.7
@@ -1045,14 +1045,18 @@
continue;
}
if(subpartsMap.containsKey(BASIC_TYPE_SENTINEL)){
- writeDataType(out, messageQName.getLocalPart(),
- subpartsMap.get(BASIC_TYPE_SENTINEL),
- type2Members, type2Members, "");
- }
- else{
- for(Map.Entry subpart: subpartsMap.entrySet()){
- writeDataType(out, subpart.getKey(), subpart.getValue(), type2Members, type2Members, "");
+ QName t = subpartsMap.get(BASIC_TYPE_SENTINEL);
+ while(DEFERRED_NAMESPACE_URI.equals(t.getNamespaceURI())){
+ String[] p = t.getLocalPart().split("_deferred_");
+ t = new QName(decode(p[0]), p[1]);
+ }
+ if(t.getNamespaceURI().equals("http://www.w3.org/2001/XMLSchema")){
+ throw new Exception("Got bare XSD type as contents of WSDL message");
}
+ subpartsMap = type2Members.get(t);
+ }
+ for(Map.Entry subpart: subpartsMap.entrySet()){
+ writeDataType(out, subpart.getKey(), subpart.getValue(), type2Members, type2Members, "");
}
}
else{ // rpc style
From kawas at dev.open-bio.org Fri Aug 28 10:15:58 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 10:15:58 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281415.n7SEFv0S017683@dev.open-bio.org>
kawas
Fri Aug 28 10:15:57 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi
In directory dev.open-bio.org:/tmp/cvs-serv17648/MOBY-Server/share/cgi
Modified Files:
RESOURCES
Log Message:
bug fix: sometimes users hit the url with Objects/, or Namespaces/, etc and the trailing slash tripped up the script.
moby-live/Perl/MOBY-Server/share/cgi RESOURCES,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES 2008/06/19 17:02:25 1.3
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/RESOURCES 2009/08/28 14:15:57 1.4
@@ -47,7 +47,8 @@
$url =~ s/%([\da-f][\da-f])/chr( hex($1) )/egi;
my $form = new CGI;
-if ( $url =~ m/^RESOURCES\/MOBY\-S\/Objects(\/[A-Za-z0-9_\-]*)?$/ ) {
+if ( $url =~ m/^RESOURCES\/MOBY\-S\/Objects(\/[A-Za-z0-9_\-]+)?$/ ) {
+ my $byName = length( substr $1, 1) > 0 if $1;
do {
if ($useCache) {
my $x =
@@ -60,14 +61,15 @@
$x = $x->createAll();
print $form->header('text/xml'), $x if $x;
}
- } unless $1;
+ } unless $byName;
do {
my $x = MOBY::RDF::Ontologies::Objects->new;
my $rdf = $x->createByName( { term => substr $1, 1 } );
print $form->header('text/xml'), $rdf if $rdf;
- } if $1;
+ } if $byName;
-} elsif ( $url =~ m/^RESOURCES\/MOBY\-S\/Services(\/[A-Za-z0-9_\-]*)?$/ ) {
+} elsif ( $url =~ m/^RESOURCES\/MOBY\-S\/Services(\/[A-Za-z0-9_\-]+)?$/ ) {
+ my $byName = length( substr $1, 1) > 0 if $1;
do {
if ($useCache) {
my $x =
@@ -80,12 +82,12 @@
$x = $x->createAll();
print $form->header('text/xml'), $x if $x;
}
- } unless $1;
+ } unless $byName;
do {
my $x = MOBY::RDF::Ontologies::ServiceTypes->new;
my $rdf = $x->createByName( { term => substr $1, 1 } );
print $form->header('text/xml'), $rdf if $rdf;
- } if $1;
+ } if $byName;
} elsif ( $url =~
m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]*,[A-Za-z0-9_\-]*){1}$/
)
@@ -117,7 +119,7 @@
} unless $string;
} elsif ( $url =~
-m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]*\/[A-Za-z0-9_\-]*)?$/
+m/^RESOURCES\/MOBY\-S\/ServiceInstances(\/[A-Za-z0-9_\-.]+\/[A-Za-z0-9_\-]+)?$/
)
{
my $string = $1 || "";
@@ -169,25 +171,28 @@
print $form->header('text/xml'), $x if $x;
} if $string;
-} elsif ( $url =~ m/^RESOURCES\/MOBY\-S\/Namespaces(\/[A-Za-z0-9_\-]*)?$/ ) {
- do {
- if ($useCache) {
- my $x =
- MOBY::RDF::Ontologies::Cache::NamespaceCache->new(
- cache => "$dir", );
- $x = $x->get_rdf();
- print $form->header('text/xml'), $x if $x;
- } else {
- my $x = MOBY::RDF::Ontologies::Namespaces->new;
- $x = $x->createAll();
- print $form->header('text/xml'), $x if $x;
- }
- } unless $1;
+} elsif ( $url =~ m/^RESOURCES\/MOBY\-S\/Namespaces(\/[A-Za-z0-9_\-]+)?$/ ) {
+ my $byName = length( substr $1, 1) > 0 if $1;
do {
my $x = MOBY::RDF::Ontologies::Namespaces->new;
my $rdf = $x->createByName( { term => substr $1, 1 } );
print $form->header('text/xml'), $rdf if $rdf;
- } if $1;
+ } if $byName;
+
+ do {
+ if ($useCache) {
+ my $x =
+ MOBY::RDF::Ontologies::Cache::NamespaceCache->new(
+ cache => "$dir", );
+ $x = $x->get_rdf();
+ print $form->header('text/xml'), $x if $x;
+ } else {
+ my $x = MOBY::RDF::Ontologies::Namespaces->new;
+ $x = $x->createAll();
+ print $form->header('text/xml'), $x if $x;
+ }
+ } unless $byName;
+
} elsif ( $url =~ m/^RESOURCES\/MOBY\-S\/FULL$/ ) {
my $dom = undef;
my $parser = XML::LibXML->new();
From kawas at dev.open-bio.org Fri Aug 28 10:19:38 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 10:19:38 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281419.n7SEJcgp017777@dev.open-bio.org>
kawas
Fri Aug 28 10:19:38 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv17742/MOBY-Server/lib/MOBY
Modified Files:
Central.pm
Log Message:
updated the regex expressions that checks the term names when registering new nodes in the ontology.
moby-live/Perl/MOBY-Server/lib/MOBY Central.pm,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2009/08/19 15:36:19 1.10
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2009/08/28 14:19:38 1.11
@@ -318,7 +318,7 @@
return &_error("Object name may not contain spaces or other characters invalid in a URN",
""
)
- if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\+]/;
+ if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
if ( $term =~ m"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" )
{ # matches a URI
return &_error( "Object name may not be an URN or URI", "" ) if $1;
@@ -739,6 +739,10 @@
""
)
unless $email =~ /\S\@\S+\.\S+/;
+ return &_error("serviceType name may not contain spaces or other characters invalid in a URN",
+ ""
+ )
+ if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
# validate that the final ontology will be valid
my ( $exists, $exists_message, $existingURI ) =
@@ -999,6 +1003,10 @@
);
}
+ return &_error("Namespace name may not contain spaces or other characters invalid in a URN",
+ ""
+ )
+ if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
return &_error( "Malformed authURI - must not have an http:// prefix", "" )
if $auth =~ '[/:]';
return &_error( "Malformed authURI - must take the form NNN.NNN.NNN", "" )
@@ -1396,6 +1404,7 @@
$error .= "missing serviceType \n" unless defined $serviceType;
$error .= "invalid character string for serviceName. Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^[^A-Za-z]/);
$error .= "invalid character string for serviceName. Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^.+?[^A-Za-z0-9_]/);
+ $error .= "service name may not contain spaces or other characters invalid in a URN" if $serviceName =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
# $error .="missing signatureURL \n" unless defined $signatureURL;
$error .= "missing authURI \n" unless defined $AuthURI;
@@ -2946,6 +2955,7 @@
if ( $def{description} =~ /[^\]]+))\]\]>/ ) {
$def{description} = $1;
}
+
my $response;
$response = "
$def{objectType}
From kawas at dev.open-bio.org Fri Aug 28 10:40:45 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 10:40:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281440.n7SEejaD017919@dev.open-bio.org>
kawas
Fri Aug 28 10:40:44 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv17884/MOBY-Server/lib/MOBY
Modified Files:
Central.pm
Log Message:
updated the regex expressions that checks the term names when registering new nodes in the ontology.
moby-live/Perl/MOBY-Server/lib/MOBY Central.pm,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2009/08/28 14:19:38 1.11
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2009/08/28 14:40:44 1.12
@@ -318,7 +318,7 @@
return &_error("Object name may not contain spaces or other characters invalid in a URN",
""
)
- if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+ if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
if ( $term =~ m"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" )
{ # matches a URI
return &_error( "Object name may not be an URN or URI", "" ) if $1;
@@ -742,7 +742,7 @@
return &_error("serviceType name may not contain spaces or other characters invalid in a URN",
""
)
- if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+ if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
# validate that the final ontology will be valid
my ( $exists, $exists_message, $existingURI ) =
@@ -1006,7 +1006,7 @@
return &_error("Namespace name may not contain spaces or other characters invalid in a URN",
""
)
- if $term =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+ if $term =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
return &_error( "Malformed authURI - must not have an http:// prefix", "" )
if $auth =~ '[/:]';
return &_error( "Malformed authURI - must take the form NNN.NNN.NNN", "" )
@@ -1404,7 +1404,7 @@
$error .= "missing serviceType \n" unless defined $serviceType;
$error .= "invalid character string for serviceName. Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^[^A-Za-z]/);
$error .= "invalid character string for serviceName. Must start with a letter followed by [A-Za-z0-9_]\n" if ($serviceName =~ /^.+?[^A-Za-z0-9_]/);
- $error .= "service name may not contain spaces or other characters invalid in a URN" if $serviceName =~ /[\/\'\\\s\"\&\<\>\[\]\^\`\{\|\}\~\%\!\@\#\$\%\*\+\=]/;
+ $error .= "service name may not contain spaces or other characters invalid in a URN" if $serviceName =~ /[\/\'\\\s"\&\<\>\[\]\^\`\{\|\}\~%\!\@#\$\*\+=]/;
# $error .="missing signatureURL \n" unless defined $signatureURL;
$error .= "missing authURI \n" unless defined $AuthURI;
@@ -2963,9 +2963,9 @@
$def{authURI}
$def{contactEmail}\n";
my %relationships = %{ $def{Relationships} };
-
- while ( my ( $rel, $objdefs ) = each %relationships ) {
- $response .= "\n";
+
+ while ( my ( $rel, $objdefs ) = each %relationships ) {
+ $response .= "\n";
foreach my $def ( @{$objdefs} ) {
my ( $lsid, $articlename,$type, $def, $auth, $contac ) = @{$def};
$articlename = "" unless defined $articlename;
From kawas at dev.open-bio.org Fri Aug 28 11:03:33 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 11:03:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281503.n7SF3Xf6018095@dev.open-bio.org>
kawas
Fri Aug 28 11:03:33 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server
In directory dev.open-bio.org:/tmp/cvs-serv18060/MOBY-Server
Modified Files:
Changes
Log Message:
moby-live/Perl/MOBY-Server Changes,1.29,1.30
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2009/08/19 15:38:39 1.29
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2009/08/28 15:03:33 1.30
@@ -3,8 +3,11 @@
1.11
- Updated the Makefile.PL to handle some missing dependencies.
- - Added '%' to the list of characters not allowed in the name of
- a datatype.
+ Changes
+ * Updated the RESOURCES script to better handle trailing slashes
+ on Objects/, Namespaces, Services/
+ * Updated the regex expressions that are applied against terms
+ when registering new nodes in the biomoby ontologies.
1.10
- Added a RESTful WSDL page to the installation. Basically, you do
From kawas at dev.open-bio.org Fri Aug 28 11:07:18 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 11:07:18 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281507.n7SF7IFN018280@dev.open-bio.org>
kawas
Fri Aug 28 11:07:18 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Server
In directory dev.open-bio.org:/tmp/cvs-serv18245/MOBY-Server
Modified Files:
Makefile.PL
Log Message:
updated version for new cpan release.
moby-live/Perl/MOBY-Server Makefile.PL,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2009/05/22 16:38:39 1.19
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2009/08/28 15:07:18 1.20
@@ -3,7 +3,7 @@
# Define metadata
name 'MOBY';
- version '1.10';
+ version '1.11';
license 'perl';
abstract
'This distribution is for communicating with or creating your own MOBY Central registry';
From kawas at dev.open-bio.org Fri Aug 28 11:15:16 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 11:15:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281515.n7SFFGJ4018496@dev.open-bio.org>
kawas
Fri Aug 28 11:15:16 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module
In directory dev.open-bio.org:/tmp/cvs-serv18457/MOBY-Client/inc/Module
Modified Files:
AutoInstall.pm Install.pm
Log Message:
updated the module::install inc modules.
moby-live/Perl/MOBY-Client/inc/Module AutoInstall.pm,1.1,1.2 Install.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/AutoInstall.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/AutoInstall.pm 2008/02/21 00:14:33 1.1
+++ /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/AutoInstall.pm 2009/08/28 15:15:15 1.2
@@ -18,7 +18,9 @@
# various lexical flags
my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS );
-my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly );
+my (
+ $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps
+);
my ( $PostambleActions, $PostambleUsed );
# See if it's a testing or non-interactive session
@@ -73,6 +75,9 @@
elsif ( $arg =~ /^--test(?:only)?$/ ) {
$TestOnly = 1;
}
+ elsif ( $arg =~ /^--all(?:deps)?$/ ) {
+ $AllDeps = 1;
+ }
}
}
@@ -115,6 +120,13 @@
)[0]
);
+ # We want to know if we're under CPAN early to avoid prompting, but
+ # if we aren't going to try and install anything anyway then skip the
+ # check entirely since we don't want to have to load (and configure)
+ # an old CPAN just for a cosmetic message
+
+ $UnderCPAN = _check_lock(1) unless $SkipInstall;
+
while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
my ( @required, @tests, @skiptests );
my $default = 1;
@@ -163,15 +175,24 @@
}
# XXX: check for conflicts and uninstalls(!) them.
- if (
- defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
+ my $cur = _load($mod);
+ if (_version_cmp ($cur, $arg) >= 0)
{
print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
push @Existing, $mod => $arg;
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
- print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ if (not defined $cur) # indeed missing
+ {
+ print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ }
+ else
+ {
+ # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
+ print "too old. ($cur < $arg)\n";
+ }
+
push @required, $mod => $arg;
}
}
@@ -184,6 +205,8 @@
!$SkipInstall
and (
$CheckOnly
+ or ($mandatory and $UnderCPAN)
+ or $AllDeps
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
@@ -214,8 +237,6 @@
}
}
- $UnderCPAN = _check_lock(); # check for $UnderCPAN
-
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
@@ -234,21 +255,38 @@
*{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
}
+sub _running_under {
+ my $thing = shift;
+ print <<"END_MESSAGE";
+*** Since we're running under ${thing}, I'll just let it take care
+ of the dependency's installation later.
+END_MESSAGE
+ return 1;
+}
+
# Check to see if we are currently running under CPAN.pm and/or CPANPLUS;
# if we are, then we simply let it taking care of our dependencies
sub _check_lock {
- return unless @Missing;
+ return unless @Missing or @_;
+
+ my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING};
if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) {
- print <<'END_MESSAGE';
+ return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS');
+ }
-*** Since we're running under CPANPLUS, I'll just let it take care
- of the dependency's installation later.
-END_MESSAGE
- return 1;
+ require CPAN;
+
+ if ($CPAN::VERSION > '1.89') {
+ if ($cpan_env) {
+ return _running_under('CPAN');
+ }
+ return; # CPAN.pm new enough, don't need to check further
}
- _load_cpan();
+ # last ditch attempt, this -will- configure CPAN, very sorry
+
+ _load_cpan(1); # force initialize even though it's already loaded
# Find the CPAN lock-file
my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" );
@@ -284,7 +322,7 @@
while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
# grep out those already installed
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
else {
@@ -313,7 +351,7 @@
@modules = @newmod;
}
- if ( _has_cpanplus() ) {
+ if ( _has_cpanplus() and not $ENV{PERL_AUTOINSTALL_PREFER_CPAN} ) {
_install_cpanplus( \@modules, \@config );
} else {
_install_cpan( \@modules, \@config );
@@ -323,7 +361,7 @@
# see if we have successfully installed them
while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
@@ -378,7 +416,7 @@
my $success;
my $obj = $modtree->{$pkg};
- if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -471,7 +509,7 @@
my $obj = CPAN::Shell->expand( Module => $pkg );
my $success = 0;
- if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -535,7 +573,7 @@
my $ver = shift;
return
- if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
+ if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
@@ -632,7 +670,7 @@
# Load CPAN.pm and it's configuration
sub _load_cpan {
- return if $CPAN::VERSION;
+ return if $CPAN::VERSION and $CPAN::Config and not @_;
require CPAN;
if ( $CPAN::HandleConfig::VERSION ) {
# Newer versions of CPAN have a HandleConfig module
@@ -644,9 +682,11 @@
}
# compare two versions, either use Sort::Versions or plain comparison
-sub _version_check {
+# return values same as <=>
+sub _version_cmp {
my ( $cur, $min ) = @_;
- return unless defined $cur;
+ return -1 unless defined $cur; # if 0 keep comparing
+ return 1 unless $min;
$cur =~ s/\s+$//;
@@ -657,16 +697,13 @@
) {
# use version.pm if it is installed.
- return (
- ( version->new($cur) >= version->new($min) ) ? $cur : undef );
+ return version->new($cur) <=> version->new($min);
}
elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
{
# use Sort::Versions as the sorting algorithm for a.b.c versions
- return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
- ? $cur
- : undef );
+ return Sort::Versions::versioncmp( $cur, $min );
}
warn "Cannot reliably compare non-decimal formatted versions.\n"
@@ -675,7 +712,7 @@
# plain comparison
local $^W = 0; # shuts off 'not numeric' bugs
- return ( $cur >= $min ? $cur : undef );
+ return $cur <=> $min;
}
# nothing; this usage is deprecated.
@@ -706,7 +743,7 @@
if $Config;
$PostambleActions = (
- $missing
+ ($missing and not $UnderCPAN)
? "\$(PERL) $0 --config=$config --installdeps=$missing"
: "\$(NOECHO) \$(NOOP)"
);
@@ -746,7 +783,7 @@
sub postamble {
$PostambleUsed = 1;
- return << ".";
+ return <<"END_MAKE";
config :: installdeps
\t\$(NOECHO) \$(NOOP)
@@ -757,7 +794,7 @@
installdeps ::
\t$PostambleActions
-.
+END_MAKE
}
@@ -765,4 +802,4 @@
__END__
-#line 1003
+#line 1056
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install.pm 2008/05/07 18:15:19 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install.pm 2009/08/28 15:15:16 1.3
@@ -17,12 +17,10 @@
# 3. The ./inc/ version of Module::Install loads
# }
-BEGIN {
- require 5.004;
-}
+use 5.005;
use strict 'vars';
-use vars qw{$VERSION};
+use vars qw{$VERSION $MAIN};
BEGIN {
# All Module::Install core packages now require synchronised versions.
# This will be used to ensure we don't accidentally load old or
@@ -30,7 +28,10 @@
# 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.72';
+ $VERSION = '0.91';
+
+ # Storage for the pseudo-singleton
+ $MAIN = undef;
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
@@ -69,15 +70,26 @@
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
-if ( -f $0 and (stat($0))[9] > time ) { die <<"END_DIE" }
+if ( -f $0 ) {
+ my $s = (stat($0))[9];
-Your installer $0 has a modification time in the future.
+ # If the modification time is only slightly in the future,
+ # sleep briefly to remove the problem.
+ my $a = $s - time;
+ if ( $a > 0 and $a < 5 ) { sleep 5 }
+
+ # Too far in the future, throw an error.
+ my $t = time;
+ if ( $s > $t ) { die <<"END_DIE" }
+
+Your installer $0 has a modification time in the future ($s > $t).
This is known to create infinite loops in make.
Please correct this, then run $0 again.
END_DIE
+}
@@ -85,7 +97,7 @@
# Build.PL was formerly supported, but no longer is due to excessive
# difficulty in implementing every single feature twice.
-if ( $0 =~ /Build.PL$/i or -f 'Build.PL' ) { die <<"END_DIE" }
+if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
Module::Install no longer supports Build.PL.
@@ -121,12 +133,22 @@
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
- # delegate back to parent dirs
+ # Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
+ my $method = $1;
+ if ( uc($method) eq $method ) {
+ # Do nothing
+ return;
+ } elsif ( $method =~ /^_/ and $self->can($method) ) {
+ # Dispatch to the root M:I class
+ return $self->$method(@_);
+ }
+
+ # Dispatch to the appropriate plugin
unshift @_, ( $self, $1 );
- goto &{$self->can('call')} unless uc($1) eq $1;
+ goto &{$self->can('call')};
};
}
@@ -151,6 +173,9 @@
delete $INC{"$self->{file}"};
delete $INC{"$self->{path}.pm"};
+ # Save to the singleton
+ $MAIN = $self;
+
return 1;
}
@@ -164,8 +189,7 @@
my @exts = @{$self->{extensions}};
unless ( @exts ) {
- my $admin = $self->{admin};
- @exts = $admin->load_all_extensions;
+ @exts = $self->{admin}->load_all_extensions;
}
my %seen;
@@ -248,7 +272,7 @@
sub load_extensions {
my ($self, $path, $top) = @_;
- unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+ unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
unshift @INC, $self->{prefix};
}
@@ -312,7 +336,7 @@
#####################################################################
-# Utility Functions
+# Common Utility Functions
sub _caller {
my $depth = 0;
@@ -326,28 +350,81 @@
sub _read {
local *FH;
- open FH, "< $_[0]" or die "open($_[0]): $!";
- my $str = do { local $/; };
+ if ( $] >= 5.006 ) {
+ open( FH, '<', $_[0] ) or die "open($_[0]): $!";
+ } else {
+ open( FH, "< $_[0]" ) or die "open($_[0]): $!";
+ }
+ my $string = do { local $/; };
close FH or die "close($_[0]): $!";
- return $str;
+ return $string;
+}
+
+sub _readperl {
+ my $string = Module::Install::_read($_[0]);
+ $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg;
+ $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s;
+ $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg;
+ return $string;
+}
+
+sub _readpod {
+ my $string = Module::Install::_read($_[0]);
+ $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg;
+ return $string if $_[0] =~ /\.pod\z/;
+ $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg;
+ $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg;
+ $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg;
+ $string =~ s/^\n+//s;
+ return $string;
}
sub _write {
local *FH;
- open FH, "> $_[0]" or die "open($_[0]): $!";
- foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!" }
+ if ( $] >= 5.006 ) {
+ open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+ } else {
+ open( FH, "> $_[0]" ) or die "open($_[0]): $!";
+ }
+ foreach ( 1 .. $#_ ) {
+ print FH $_[$_] or die "print($_[0]): $!";
+ }
close FH or die "close($_[0]): $!";
}
-sub _version {
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+sub _version ($) {
my $s = shift || 0;
- $s =~ s/^(\d+)\.?//;
+ my $d =()= $s =~ /(\.)/g;
+ if ( $d >= 2 ) {
+ # Normalise multipart versions
+ $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
+ }
+ $s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
- my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g;
- $l = $l . '.' . join '', @v if @v;
+ my @v = map {
+ $_ . '0' x (3 - length $_)
+ } $s =~ /(\d{1,3})\D?/g;
+ $l = $l . '.' . join '', @v if @v;
return $l + 0;
}
+sub _cmp ($$) {
+ _version($_[0]) <=> _version($_[1]);
+}
+
+# Cloned from Params::Util::_CLASS
+sub _CLASS ($) {
+ (
+ defined $_[0]
+ and
+ ! ref $_[0]
+ and
+ $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s
+ ) ? $_[0] : undef;
+}
+
1;
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.
From kawas at dev.open-bio.org Fri Aug 28 11:15:16 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 28 Aug 2009 11:15:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200908281515.n7SFFGeG018558@dev.open-bio.org>
kawas
Fri Aug 28 11:15:16 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install
In directory dev.open-bio.org:/tmp/cvs-serv18457/MOBY-Client/inc/Module/Install
Modified Files:
AutoInstall.pm Share.pm Include.pm Makefile.pm WriteAll.pm
Base.pm Win32.pm Metadata.pm Fetch.pm Can.pm
Added Files:
Scripts.pm
Log Message:
updated the module::install inc modules.
moby-live/Perl/MOBY-Client/inc/Module/Install Scripts.pm,1.2,1.3 AutoInstall.pm,1.2,1.3 Share.pm,1.2,1.3 Include.pm,1.2,1.3 Makefile.pm,1.2,1.3 WriteAll.pm,1.2,1.3 Base.pm,1.2,1.3 Win32.pm,1.2,1.3 Metadata.pm,1.2,1.3 Fetch.pm,1.2,1.3 Can.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install/Scripts.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install/Scripts.pm 2008/05/07 18:15:19 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY-Client/inc/Module/Install/Scripts.pm 2009/08/28 15:15:16 1.3
@@ -1,50 +1,29 @@
#line 1
package Module::Install::Scripts;
-use strict;
-use Module::Install::Base;
-use File::Basename ();
+use strict 'vars';
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.67';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
-}
-
-sub prompt_script {
- my ($self, $script_file) = @_;
-
- my ($prompt, $abstract, $default);
- foreach my $line ( $self->_read_script($script_file) ) {
- last unless $line =~ /^#/;
- $prompt = $1 if $line =~ /^#\s*prompt:\s+(.*)/;
- $default = $1 if $line =~ /^#\s*default:\s+(.*)/;
- $abstract = $1 if $line =~ /^#\s*abstract:\s+(.*)/;
- }
- unless (defined $prompt) {
- my $script_name = File::Basename::basename($script_file);
- $prompt = "Do you want to install '$script_name'";
- $prompt .= " ($abstract)" if defined $abstract;
- $prompt .= '?';
- }
- return unless $self->prompt($prompt, ($default || 'n')) =~ /^[Yy]/;
- $self->install_script($script_file);
}
sub install_script {
- my $self = shift;
- my $args = $self->makemaker_args;
- my $exe_files = $args->{EXE_FILES} ||= [];
- push @$exe_files, @_;
-}
-
-sub _read_script {
- my ($self, $script_file) = @_;
- local *SCRIPT;
- open SCRIPT, $script_file
- or die "Can't open '$script_file' for input: $!\n";
- return |