Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Getting a module added
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Getting a module added
Getting a module added
15-08-2008 4:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi, Im using the ccgi webpace for a home project. I need to find out the size of an image using Perl, to do this I need to use Image::Size but that module is not installed on the server.
is there somewhere I can request that it is installed?
TIA
is there somewhere I can request that it is installed?
TIA
Message 1 of 6
(1,661 Views)
5 REPLIES 5
Re: Getting a module added
15-08-2008 7:05 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
At this moment in time it is not currently possible.
We are smack bang in the middle of a review of the platform on what we should do for the future, as something we have recognised for a long time that the platform is far from suitable for future use.
As such, I feel your pain. There are many aspects of the service I too want improved to allow me to develop things, but I would also prefer the platform to have a long term future much more than to get the little bits I need right now.
The good news it there are often a workaround, but unfortunately there are aspects of Perl I hate because I just don't quite grasp them, so couldn't tell you where to start looking.
We are smack bang in the middle of a review of the platform on what we should do for the future, as something we have recognised for a long time that the platform is far from suitable for future use.
As such, I feel your pain. There are many aspects of the service I too want improved to allow me to develop things, but I would also prefer the platform to have a long term future much more than to get the little bits I need right now.
The good news it there are often a workaround, but unfortunately there are aspects of Perl I hate because I just don't quite grasp them, so couldn't tell you where to start looking.
Message 2 of 6
(354 Views)
Re: Getting a module added
16-08-2008 1:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for the reply P Richardson. Straight fwd to the point and honest.
With software there are often many ways to achieve the same goal. Like you some of the Perl modules make no sense to me aswell. I'll keep looking for another way of doing what I want, besides its not the end of the world if I dont do it, it would just be nice.
Cheers
With software there are often many ways to achieve the same goal. Like you some of the Perl modules make no sense to me aswell. I'll keep looking for another way of doing what I want, besides its not the end of the world if I dont do it, it would just be nice.
Cheers
Message 3 of 6
(354 Views)
Re: Getting a module added
22-08-2008 1:56 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've never used Perl in my life,
But, PHP's GD Extension is there if you need it...
I assume Perl can run System Commands?
if so just tell it to run this PHP Script
imgwh.php
imgwh
It should then work, something like this
#> ./imgwh myfile.png
320,240
#>
Then, use perl to Execute, take in the Data and separate by the Comma...
Hope that helps!
Jim,
But, PHP's GD Extension is there if you need it...
I assume Perl can run System Commands?
if so just tell it to run this PHP Script
imgwh.php
<?PHP
//Initialise
$X=0;
$Y=0;
$img='';
// Get File Extension
$Ext = explode('.',$argv[1]);
// Find File Type & Load
switch( strtolower($Ext[count($Ext)]) ){
case "png":
$img = imagecreatefrompng($argv[1]);
break;
case "gif":
$img = imagecreatefromgif($argv[1]);
break;
case "jpg":
$img = imagecreatefromjpeg($argv[1]);
break;
case "jpeg":
$img = imagecreatefrompng($argv[1]);
break;
}
if($img != ''){ //if the resuls is not empty, it has loaded...
$X = imagesx($img);
$Y = imagesy($img);
echo $X. ','. $Y; //output image dimensions
}
?>
imgwh
#!/usr/local/bin/php imgwh.php $*
It should then work, something like this
#> ./imgwh myfile.png
320,240
#>
Then, use perl to Execute, take in the Data and separate by the Comma...
Hope that helps!
Jim,
Message 4 of 6
(354 Views)
Re: Getting a module added
22-08-2008 2:54 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Its possible to install your own modules.
Too much to post here but I'm trying to write up the procedure, basically you create a library directory under your cgi-bin (or at least thats where mine is) and a ".cpan" directory under your home, then you can just run the cpan shell and install stuff from cpan.
Otherwise you can probably get the image size functionality from GD as the Perl GD modules are installed.
Too much to post here but I'm trying to write up the procedure, basically you create a library directory under your cgi-bin (or at least thats where mine is) and a ".cpan" directory under your home, then you can just run the cpan shell and install stuff from cpan.
Otherwise you can probably get the image size functionality from GD as the Perl GD modules are installed.
Message 5 of 6
(354 Views)
Re: Getting a module added
02-09-2008 3:46 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: P The good news it there are often a workaround, but unfortunately there are aspects of Perl I hate because I just don't quite grasp them, so couldn't tell you where to start looking.
There appears to be a workaround package called local::lib which creates a local library directory in the user's home directory. From a brief initial look it appears that local::lib fixes several environment variables so that any perl module you try to install gets sent to your dir not the public one. The bodge I gave in my previous post only works for some modules, pure Perl modules only I think.
Incidentally the description of local::lib in cpan lost me, but the version on the catalyst homepage made sense I think.
Message 6 of 6
(354 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Getting a module added