Problem with rlm_perl.

Boian Jordanov bjordanov at orbitel.bg
Wed Mar 8 10:33:18 CET 2006


On Monday 06 March 2006 15:24, Nikos Diamantis wrote:
> wazn at sibmail.ru wrote:
>
> It is:
>
> <*quote*>
>     use Data::Dumper;
> </*quote*>
>
> in "example.pl" that causes the trouble.
>
It seems you don't have a Data::Dumper module. Running your script with "perl 
example.pl" can show this. 

> Quote from:
>
>
> http://www.perl.com/doc/manual/html/pod/perlembed.html#Compiling_your_C_pro
>gram
>
> <*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
>
You don't need that. This is done automatically.

> 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.
>

This is completly wrong.
Read the "Using Perl modules, which themselves use C libraries, from your C 
program" subsection in perlemebed manual page to understand how this is done.

> 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?

Use command like that perl /path_to_your_program/program.pl it is enough to 
see if there is some module missing etc.
Also perl -c is good to check syntax.

>
> 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?

-- 
Best Regards,
Boian Jordanov
SNE
Orbitel - Next Generation Telecom
tel. +359 2 4004 723
tel. +359 2 4004 002



More information about the Freeradius-Users mailing list