Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
package Inline::PERL; ###################################################################### +####### # # Inline::PERL - Bring the power of PERL programming to your Perl prog +rams. # # John McNamara, jmcnamara@cpan.org # # Documentation after __END__ # $VERSION = '0.01'; require Inline; @ISA = qw(Inline); use strict; use Carp; sub register { return { language => 'PERL', aliases => ['PEARL', 'CGI'], type => 'interpreted', suffix => 'PL', }; } sub build { my $o = shift; my $code = $o->{API}{code}; if ($code =~ /strict/) { carp 'Your code contains "use strict;". Please be aware that '. 'this may provide you with too much of a clue.'; } sleep 1; # imitate compile delay { package PERL::Tester; eval $code; } croak "PERL build failed:\n$@" if $@; my $path = "$o->{API}{install_lib}/auto/$o->{API}{modpname}"; my $obj = $o->{API}{location}; $o->mkpath($path) unless -d $path; open PERL_OBJ, "> $obj" or croak "Can't open $obj for output\n$!"; print PERL_OBJ $code; close \*PERL_OBJ; } sub load { my $o = shift; my $obj = $o->{API}{location}; open PERL_OBJ, "< $obj" or croak "Can't open $obj for output\n$!"; my $code = join '', <PERL_OBJ>; close \*PERL_OBJ; eval "package $o->{API}{pkg};\n$code"; croak "Unable to load PERL module $obj:\n$@" if $@; } sub validate { my $o = shift; # Place holder } sub info { my $o = shift; # Place holder } 1; __END__ =head1 NAME Inline::PERL - Bring the power of PERL programming to your Perl progra +ms. =head1 SYNOPSIS use Inline::Files; use Inline PERL; greeting("PERL"); __PERL__ sub greeting { $foo = shift @_ || $_[0]; $! = 1; # Turn buffering off for ($i=1, $i<=10, $i++) { @a[$i] = $i; } local $length = @a.length; print "Hello, $foo\n"; } =head1 DESCRIPTION Inline::PERL gives you the power of the PERL programming language from within your Perl programs. This gives you instant access to hundreds of pre-coded applications such as bulletin boards, hit counters and shopping carts. PERL is a programming language for writing CGI applications. It's main strength is that it doesn't have any unnecessary warnings or strictures. It is a direct descendent of Perl, a programming language which was used mainly by programmers. However, the original language required too much reading and thinking and so PERL was developed as a language which was more in tune with the requirements of the Internet age. =head1 PERL DOCUMENTATION Unfortunately there is no documentation for PERL (believe me I've looked everywhere). Therefore, the best thing to do is to go straight to comp.lang.perl.misc and ask your questions there. =head1 PERFORMANCE Your Inline::PERL program will run slowly the first few times that you run it. After that you will get used to it. =head1 AUTHOR John McNamara jmcnamara@cpan.org When I set out to write this I discovered that everything that I needed was already in the Inline::Foo module. Curse you, Brian Ingerson, you are making life *too* easy. My apologies to Brian, the Inline community and, er, the PERL communit +y. =head1 COPYRIGHT © MMI, John McNamara. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

In reply to Inline::PERL by jmcnamara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found