PERL+CGI+PLUG-IN architecture

E

Eric Schwartz

Colombo said:
I'm looking for any information (or example programs) about writing
programs in perl (cgi) in plug-in architecture. I was searching almost
everywhere with no result :(.

I understand English is probably not your first language, but I must
confess I have no idea what you mean by "plug-in architecture". For
writing CGI in Perl, start with the documentation for CGI.pm and see
how far that gets you. If you have questions about writing CGI
programs in general, ask around in comp.infosystems.www.authoring.cgi.

-=Eric
 
A

A. Sinan Unur

Colombo said:
....

You don't know what are plugins?

Eric knows what plugins are and I do but neither of us can see the
connection between CGI and plugins. Are you talking about browser plugins
or something else? If it is something else, I am afraid it is not clear
exactly what it is that you are talking about.
I have to write a program which will load a plugin e.g. written by some
else, and will use it.

Do you mean a library? If so, see

perldoc perlmod

perldoc perlmodlib

and

perldoc -q CPAN

In windows programing I would use dll libraries but afaik there is
nothing like that in perl.

Well, there is Dynaloader. But I still don't see the connection between
plugins and CGI.
So I ask if anyone knows how to make this kind of programs.

You will need to exapnd on what you mean by "this kind of".
Yes english isn't my first language, but is it so big problem?

In this case, it seems to be. But it may just be the fact that you do not
know the correct name for what you are looking for.

Sinan,
 
E

Eric Schwartz

Colombo said:
You don't know what are plugins?

No, I didn't know what you meant by 'plug-in architecture'. You could
have meant writing CGI programs as plugins to someone else's code, or
writing plugins for existing CGI programs that have some sort of
plugin architecture.
I have to write a program which will load a plugin e.g. written by some
else, and will use it. In windows programing I would use dll libraries
but afaik there is nothing like that in perl.

Yes there is; modules. See 'perldoc perlmod' for more information on
modules in Perl.
So I ask if anyone knows how to make this kind of programs.

That wasn't clear to me from your originaly question, which is why I
asked. Read up on modules; they pretty much solve the kind of problem
you have.
Yes english isn't my first language, but is it so big problem?

I only suggested that as a possible explanation for the ambiguity in
your original query.

-=Eric
 
G

Gunnar Hjalmarsson

C

Colombo

Hi,
I'm looking for any information (or example programs) about writing
programs in perl (cgi) in plug-in architecture. I was searching almost
everywhere with no result :(.

Colombo
 
C

Colombo

Eric said:
I understand English is probably not your first language, but I must
confess I have no idea what you mean by "plug-in architecture". For
writing CGI in Perl, start with the documentation for CGI.pm and see
how far that gets you. If you have questions about writing CGI
programs in general, ask around in comp.infosystems.www.authoring.cgi.

-=Eric

You don't know what are plugins?
I have to write a program which will load a plugin e.g. written by some
else, and will use it. In windows programing I would use dll libraries
but afaik there is nothing like that in perl. So I ask if anyone knows
how to make this kind of programs.
Yes english isn't my first language, but is it so big problem?

Colombo
 
C

Colombo

Michael Vilain said:
AFAIK, perl's CGI.pm doesn't have a "plugin" architecture, so that's
probably why you didn't find any "hits". Perl itself has a vast library
of modules (http://www.cpan.org) and there are documented ways of
writing perl modules.

perldoc perlmod

There are also lots of books out there on how to write perl code. I'm
sure you can find one that works for you in whatever language you're
comfortable with.

What business problem are you trying to solve that makes you think you
need to use perl's CGI with a plug-in architecture? As a last resort,
you could always write your own module with your own architecture, but
why re-invent the wheel?

I have to build a program that helps in server administration, sth. like
webmin. The main program will manage plugins, and each plugin will
administrate one type of server (e.g. apache, sendmail,...). I must use
plug-in architecture because this is what my teacher want me to do.
Firstly I was told to use Mason modul by when my teacher heard about it
he forbid me using it.
Thanks for perlmod. I overlooked this when I was fighting with Mason.

Colombo
 
C

Colombo

Eric said:
No, I didn't know what you meant by 'plug-in architecture'. You could
have meant writing CGI programs as plugins to someone else's code, or
writing plugins for existing CGI programs that have some sort of
plugin architecture.




Yes there is; modules. See 'perldoc perlmod' for more information on
modules in Perl.




That wasn't clear to me from your originaly question, which is why I
asked. Read up on modules; they pretty much solve the kind of problem
you have.




I only suggested that as a possible explanation for the ambiguity in
your original query.

-=Eric

Thanks for help. I'll try to use this perlmod. I wrote more about my
problem in answer to other post. Maybe I should sorry for my english
earlier but we are on the net and most of people here don't know eglish
perfectly. I'm trying to write this program for so long that I am in it
and didn't think that anyone else could not know what I mean. Sorry.

Colombo
 
J

Jürgen Exner

Colombo said:
In other way, I'm looking for mechanism in perl to load and use new
modules while running program.
I hope this is clear because I don't know how to explain it in other
way.

Ah, ok, why didnt' you say so in the first place?

Most likely you are looking for
perldoc -f require
but you should also check
perldoc -f do
perldoc -f eval

jue
 
C

Colombo

Colombo said:
Hi,
I'm looking for any information (or example programs) about writing
programs in perl (cgi) in plug-in architecture. I was searching almost
everywhere with no result :(.

Colombo

In other way, I'm looking for mechanism in perl to load and use new
modules while running program.
I hope this is clear because I don't know how to explain it in other way.

Colombo
 
C

Colombo

Jürgen Exner said:
Ah, ok, why didnt' you say so in the first place?

Most likely you are looking for
perldoc -f require
but you should also check
perldoc -f do
perldoc -f eval

jue

Thanks. I read it and I will try to make it somehow. Maybe you know if
there is any module that makes it easier? I mean some automatic loading
modules?

Colombo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top