plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
Custom library paths not honored by installClass.pl  (#12251)
Issue

While working with the installClass.pl script (as described in http://www.plainblack.com/pr/staff/blog/installclass.pl---how-to-create-install-scripts-for-your-webgui-plugins

Attached is a patch while resolves this.

Solution Summary
Comments
knowmad
0
9/14/2011 11:18 pm
Well it looks like my issue description got snipped... Is that a known bug?

I was saying that installClass.pl doesn't honor custom library paths.
knowmad
0
9/15/2011 0:03 am
Same goes for WebGUI::Pluggable. I've attached another patch which addresses this shortcoming.
knowmad
0
9/19/2011 10:33 am
The installClass.pl.diff isn't saving to the server. Here's the content of the diff:

--- /tmp/installClass.pl    2011-09-15 00:01:48.134976758 -0400
+++ installClass.pl    2011-09-15 00:04:53.026976711 -0400
@@ -51,6 +51,16 @@
pod2usage("$0: Must specify a configFile")
    if !$configFile;

+# Load custom library paths
+foreach my $libDir ( readLines( "preload.custom" ) ) {
+    if ( !-d $libDir ) {
+        warn "WARNING: Not adding lib directory '$libDir' from preload.custom: Directory does not exist.\n";
+        next;
+    }
+    unshift @INC, $libDir;
+}
+
+
if( ! -e $configFile ) {
    my $possible_configFile = File::Spec->catfile($webguiRoot, 'etc', $configFile);
    $configFile = $possible_configFile if -e $possible_configFile;
@@ -98,6 +108,25 @@
$session->var->end;
$session->close;

+
+#-------------------------------------------------
+sub readLines {
+    my $file = shift;
+    my @lines;
+    if (open(my $fh, '<', $file)) {
+        while (my $line = <$fh>) {
+            $line =~ s/#.*//;
+            $line =~ s/^\s+//;
+            $line =~ s/\s+$//;
+            next if !$line;
+            push @lines, $line;
+        }
+        close $fh;
+    }
+    return @lines;
+}
+
+
__END__

=head1 NAME
knowmad
4
9/29/2011 10:07 pm
Colin,

It looks like the installClass.pl patch was added to 7.10.23. I had no problem installing my custom wobject with the latest version. You can close out this report.


William
Details
Ticket Status Resolved  
Rating4.0 
Submitted Byknowmad 
Date Submitted2011-09-14 
Assigned To unassigned  
Date Assigned2019-07-16 
Assigned By 
Severity Minor (annoying, but not harmful)  
What's the bug in? WebGUI Stable  
WebGUI / WRE Version 7.10.17  
URLuse/bugs/tracker/12251
Keywords
Related Files
Ticket History
9/30/2011
2:59 PM
Resolved perlDreamer
9/15/2011
4:08 AM
Ticket created knowmad
© 2019 Plain Black Corporation | All Rights Reserved