[Gimp-user] new gimp from old perl scripts ..versions conflict?

2009-03-08 Thread act
Hello,

I'm new to this list, joined on account of a nagging problem.

Web pages run through apache as local server are my favorite
easy-interfaces for many utilities written in very
rudimetary (clueless) perl over the years. They all work
except a few involving gimp, which used to work with older
versions though. I'm using Suse-11.1 (32 bit) on an amd64
machine with just about all related gimp (2.6.5) and perl
(5.10) packages installed as far as I know. As I tried to
'reactivate' one of these scripts dormant for many years it
refused to function. Looking at error messages has
identified two immediate obstacles.

1

Script prepends like these do not work (neither web nor CLI)
and I don't really know what they do exactly.

  use Gimp :auto;
  use Gimp::Fu;
  use Gimp::Net;
  use Gimp::Util;

Can't locate Gimp.pm in @INC
(@INC contains:
/usr/lib/perl5/5.10.0/i586-linux-thread-multi
/usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl

unless changed to (single lines) like
use lib
'/usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi';
use lib
'/usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi/Gimp';

This one seems to have been provisionally dealt with thanks
to a helpful soul on usenet who suggested the paths to use
instead but I'd like to get it done right i.e. make it work
without the workaround.


2

Old 'register' lines like

  register , , , , , , None, *, ,

don't work and neither do newer versions found in examples
on the net.

 Unquoted string register may clash with future reserved
 word at ..test.pl line xx.,
 String found where operator expected at ..test.pl line xx,
 near register,

Exactly what does 'register' do?  Do I even need to register
if all I want is for gimp to load or produce an image,
manipulate it soemewhat and then save it so the srcipt can
load it and erase it after use? I don't need gimp to store
the script for future use.



A sample extract is pasted below (I prefer such simple
layout/formats appropriate to my minimal perl abilities).

#!/usr/local/bin/perl -w
doasub;
exit;
  doasub {
print Said I:  Hellow World;
print World:   !Bang!;
  }

As I understood it the sript assembles the instructions and
finaly exits handing them over to gimp for execution. I'd
really like to find a short sample that works so as to have
a solid departure point at least.

Thank you.


-
#!/usr/local/bin/perl -w
printContent-type:text/html\n\n;

use Gimp qw (:auto);
use Gimp::Fu;
use Gimp::Net;
use Gimp::Util;

register , , , , , , None, *, ,

doit;

exit main();

  sub doit {
$file1=/srv/www/htdocs/user/magi/filez/source.png;
$rotangle=-238;
$radians = 2 * 3.141592654 * $rotangle/360.0;
$image1 = gimp_file_load($file1, $file1);
# later down, do some like 
$background=gimp_rotate($background,0,$radians);
$final=gimp_image_flatten($image);
$targr=/srv/www/htdocs/user/filez/target.png;
file_png_save($image, $final, $targr, $targr,
0,9,0,0,0,0,0);
# what you want from gimp
return $final;
printimg src=$final;
return ();
}
-







___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] new gimp from old perl scripts ..versions conflict?

2009-03-08 Thread act
Sven Neumann wrote:
 Hi,
 
 On Sun, 2009-03-08 at 13:10 -0400, a...@trixtar.org wrote:
 
 Can't locate Gimp.pm in @INC
 
 Looks like you don't have gimp-perl installed.

It's a little confusing, there's gimp-perl and perl-gimp, I
find only perl-Gimp for OpenSUSE and I have version
2.0pre3-4.1.i586.rpm installed. It also provides a long list
including such as

 Gimp::Fu
 Gimp::PDL
 Gimp::Util
 Gimp::Lib
 Gimp::Net

But they don't load with the 'use Gimp::Fu' command.



___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] new gimp from old perl scripts ..versions conflict?

2009-03-08 Thread act
Owen wrote:

 
 What do you get when you check your modules for Gimp?
 
 # perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted
 = sub { print canonpath $_ if /\.pm\z/ }, no_chdir = 1 }, @INC'
 |grep Gimp

That's a nice oneliner! :-)

I get some 3700 lines of output listing almost the entire
perl tree of 81 mb's  5000 files, all under /usr/lib/perl5
and including every .pm I have ever seen or thought
possible.

I 'think' there may be an installation problem. I really
don't understand why perl can't 'find' what's only a couple
of planks from where it's at.  Here's the perl lib tree

/usr/lib/perl5/
 5.10.0
   nothing gimp

 site_perl
   5.10.0
 nothing gimp

 vendor_perl
   5.10.0
 nothing gimp

   5.8.8
 i586-linux-thread-multi
Gimp
   bunch of .pm's

Gimp.pm


 Have a look at http://search.cpan.org/search?query=gimpmode=all
 and try install the missing modules
 I am unsure as to the currency of Gimp-Perl or Perl-Gimp (name I think
 depends on distro)

In this case it may be an attempt to differentiate between
the 1.x gimp series and 2.x and also to bring the naming
scheme closer to what it's supposed to. Looks like
essentially similar stuff in the packages.


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user