[EMAIL PROTECTED] wrote:
rlm_perl: perl_parse failed: /etc/freeradius/example.pl not found or has
syntax errors.
radiusd.conf[211]: test_module: Module instantiation failed.
radiusd.conf[245] Unknown module "test_module".
radiusd.conf[242] Failed to parse accounting section.

The file exists:
# ls -l /etc/freeradius/example.pl
-rw-r-----  1 root freerad 4620 Jan 24 14:26 /etc/freeradius/example.pl

Perl says that syntax is OK:
# perl -c /etc/freeradius/example.pl
/etc/freeradius/example.pl syntax OK

It is:

<*quote*>
   use Data::Dumper;
</*quote*>

in "example.pl" that causes the trouble.

Quote from:

http://www.perl.com/doc/manual/html/pod/perlembed.html#Compiling_your_C_program

<*quote*>
Also, every C program that uses Perl must link in the perl library. What's that, you ask? Perl is itself written in C; the perl library is the collection of compiled C programs that were used to create your perl executable ( /usr/bin/perl or equivalent). (Corollary: you can't use Perl from your C program unless Perl has been compiled on your machine, or installed properly--that's why you shouldn't blithely copy Perl executables from machine to machine without also copying the lib directory.)
</*quote*>

So if you include:

   -lperl

while compiling radiusd then you get what is needed to dynamically load perl modules. I don't know if this is the right way, but, at least, it works for me.

I wonder if this library inclusion could be automated at the configure stage...

Where may be the error? If the errors are in the perl module "example.pl",
how do I see the extended output?

An answer to this question would interest me, too!
If this is not possible, then which is the simpliest aproach to simulating a "radius wrapper environment" to debug a perl script?

--
Nikolaos A. Diamantis
/v / /< </ /| <-\ </ >   <-\.
<| / <-\ /v| <-\ /v 7 /-/ >

- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to