Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

un-installing perl core modules inside a freebsd jail

by gideondsouza (Pilgrim)
on Feb 20, 2013 at 09:53 UTC ( [id://1019740]=perlquestion: print w/replies, xml ) Need Help??

gideondsouza has asked for the wisdom of the Perl Monks concerning the following question:

So, just say I'm running some unknown perl scripts inside a freebsd jail.This jail is just a virtual freebsd system within the main system. I have a perl installation here.

Is there a way I can remove LWP::* or HTTP:: modules from the perl installation? So that any script writing programs to use these will break?

Can I do: $ pm-uninstall LWP::Simple, are there any consequences I'm not foreseeing?

It seems codepad does this, try running this script : http://codepad.org/DzB0uCf9, if I'm wrong, what is it doing?

  • Comment on un-installing perl core modules inside a freebsd jail

Replies are listed 'Best First'.
Re: un-installing perl core modules inside a freebsd jail
by tmharish (Friar) on Feb 20, 2013 at 10:09 UTC

    Pull out the contents of your @INC and manually move the .pm for each of the modules that you do not want used on that system to a different location.

    If your the freeBSD virtual system does not boot then you can use the main system to restore whatever is needed.

      So you're saying a plain directory removal will work without breaking anything else. I mean perl itself won't stop running or anything, just that module will vanish?
        I mean perl itself won't stop running or anything, just that module will vanish?

        Yes. Perl code which tries to load a vanished module will fail with the usual

        Can't locate Vanished/Module.pm in @INC (@INC contains: ... ) BEGIN failed--compilation aborted.

        which means that perl is working fine :)

        Well there are a bunch of modules that can access the net ( if thats what you are trying to block ) and this thread has some ways to find all modules installed.

        Regarding Perl breaking - I cannot think of any core module that allows for access to the internet ( and so removal of that will break the system ); Since I am not a 100% sure, you should, like I said earlier, keep them in a different location just so you can put them back if your OS were to break - you can do that from the main system.

Re: un-installing perl core modules inside a freebsd jail
by Anonymous Monk on Feb 20, 2013 at 10:02 UTC
    LWP isn't a core module, the end :)
      ah! This means, I can just uninstall LWP and there won't be any perl scripts that can call the internet, or are there other net api's too? (That can make get/post requests)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1019740]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-20 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found