/scripts/easyapache --perldoc
'step' => {
'0' => {
'name' => 'Frabnogizing Option',
'command' => sub {
my ($self) = @_;
my @result = ();
my $success;
my $version_string = `php -v`;
my $version;
if( $version_string =~ /PHP ([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})/ ){
$version = $1;
}
if ( $version ){
#apply patch based on version
$result[0] = 1; #got PHP version and it is ok
}else{
$result[0] = 0; #failed to get php version, do not continue
}
return
},
},
},
# ls /home/cpeasyapache/src/ |grep '^php-'
php-5.4.19/
Ah, that makes more sense. Sorry for the confusion. You may want to dump out $self and see if it contains any configuration information.Dave,
Thank you for taking the time to reply, much appreciated.
I don't need the version of the existing PHP, but the version of the PHP that is about to be compiled by EasyApache.
I think I could "ls" the src directory and grep the version number from the name of the directory, since this is what I see:
use Data::Dumper ();
print STDERR Data::Dumper::Dumper($self);