Hi all,

I started the Inline::F2003 project in 2017 because I have a strong interest in modern Fortran and Perl programming.

The project features the Perl module Inline::F2003. This module allows modern Fortran source to be inlined and called from a Perl program. The module compiles the Fortran source and builds an executable shared library that is loaded into the Perl system.

Inline::F2003 is usually invoked at compile-time. The source fragment below shows typical use of the module.

use constant { BOOL_T => 1, BOOL_F => 0 };
use File::Spec;

use Inline F2003 => "DATA",
         ( FOR        => "gfortran",
           MAKEFILE   => "",
           MAKEDIR    => File::Spec->curdir(),
           SRCLIST    => [ qw( ModMatrixOps.f03 ) ],
           DIRECTORY  => $main::InlineRoot,
           PRINT_INFO => BOOL_T );

I've uploaded a new version (1.03) to Sourceforge. The project home page is located at,

If you are interested in Perl-Fortran interoperability I would encourage you to have a look and let me know what you think. At present the project only runs on Linux systems. All the documentation is contained in the file README.html. Please read it carefully to get a good understanding of the project.

Any comments/suggestions/questions are most appreciated.

Thank you!


I downloaded it and tried it out. On Perl 5.32.1 there is the problem that you now need to use

use lib ".";

when the library is in the same directory. This was changed a while ago due to some kind of "security" thing, so now I have all these

use FindBin '$Bin';
use lib "$Bin";

statements everywhere.

I have to say I think it would be easier to upload this to CPAN then one can install it just using cpanm.

It's OK to upload unfinished modules to CPAN.

File::Find is not only on CPAN but in the Perl core and yet it is insufficiently mature to have sensible functionality or documentation.

Just think "My module cannot possibly be worse than File::Find" then it's OK to upload it.

Go go go!

Leave a comment

About Ron Grunwald

user-pic I consider myself a casual programmer these days, as I'm pursuing a career in writing. My main interests are modern Fortran, Perl and C.