March 2002 Perl Hardware Store 13

2. Manual Importing and Exporting

        use LWP::Simple;      # exports 'get' function
        sub get { ... }       # which is globbered by this 'get'
        my $html = get(...);  # oops, wrong 'get()'
        my $html = LWP::Simple::get(...);
        use LWP::Simple ();   # exports nothing
        BEGIN { *webget = \&LWP::Simple::get }
        sub get { ... }
        my $html = webget(...);


Next Copyright © 2002 M-J. Dominus