Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: Universal Require

by blazar (Canon)
on Apr 15, 2007 at 10:32 UTC ( #610176=note: print w/replies, xml ) Need Help??

in reply to Re^2: Universal Require
in thread Universal Require

as for the prob i got it working, all it needed was ;
my $content = get $url; changing to my $content = get($url);

Really? I find that hard to believe:

Update: I stand corrected. Had not really understood what the issue was about, out of only reading superficially. Shame on me! Rest of post fundamentally irrelevant now.

$ perl -MLWP::Simple -e 'print get ""' <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns="" lang="en-US" xml:lang="en-U +S"> <head><title>Michele &quot;blazar&quot; Dondi&#39;s home @ Perlmonk.or +g</title> <meta name="keywords" content="Michele, Dondi, blazar" /> <meta name="robots" content="index,follow" /> </head><body><h1>Michele &quot;blazar&quot; Dondi&#39;s home @ Perlmon</h1> <h2>News</h2> <p>I&#39;ve always been half hearted about blogs. I still am. Well, ye +ah sort of. However I&#39;ve started writing one, with a much irregular freque +ncy, but who cares? Of course, it <em>had</em> to have <code>perl</code> in the domain name: in fact <a href="">it +&#39;s at use Perl</a>. And I&#39;m writing more ore less anything that springs +to mind.</p> <h2>Old stuff</h2> <p><small>(The following is all that was here before I added the secti +on above. Not much, eh?)</small></p> <p>No, there&#39;s nothing here yet. You&#39;ll find something more, b +ut not too much, <a href="">here</a>.</p> </body></html>


$ perl -MO=Deparse,-p -MLWP::Simple -e 'print get "http://blazar.perlm"' use LWP::Simple; print(get('')); -e syntax OK

Replies are listed 'Best First'.
Re^4: Universal Require
by chromatic (Archbishop) on Apr 15, 2007 at 22:29 UTC
    Really? I find that hard to believe:

    Of course you get the prototype for get() if you load LWP::Simple at compile time! Without a BEGIN block, however, UNIVERSAL::require loads a module at run time though.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://610176]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2017-02-26 08:42 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (372 votes). Check out past polls.