The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

pugs - Perl6 User's Golfing System

SYNOPSIS

pugs [OPTIONS]

perl -e 'use pugs; # perl 6 code here...'

DESCRIPTION

This manual describes Pugs, an experimental (but useful) implementation of the Perl6 language.

Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).

If you're new to Pugs, you should start with pugs::intro (yet to be written), which is a general intro for beginners and provides some background to help you navigate the rest of Perl's extensive documentation.

(pugs is also a Perl5 pragma for using Perl6 code inline. See "The pugs pragma" below.)

For ease of access, the Pugs manual has been split up into several sections. Those marked with an asterix haven't been written yet.

Overview

    pugs                Perl overview (this section)
    pugs::intro       * Perl introduction for beginners
    pugs::toc         * Perl documentation table of contents

Reference

    pugs::run           Perl execution and options
                      * (many others)

Internals and Foreign Language Interfaces

    pugs::hack          An overview of the Pugs source tree

You should be able to view Perl's documentation with your man(1) program or perldoc(1).

THE pugs PRAGMA

[This section describes a Perl 5 pragma named pugs. Hopefully this is not too confusing.]

    #!/usr/bin/perl
    use pugs;   # Here is some Perl 6 code...
    sub postfix:<!> { [*] 1..$_ }
    sub sum_factorial { [+] 0..$_! }
    no pugs;    # Here is some Perl 5 code...
    print sum_factorial(3); # 21

The (Perl 5) pugs module lets you put Perl 6 code in Perl 5 source code after a line of:

    use pugs;

To switch back to Perl 5:

    no pugs;

See also Perl6::Pugs. The pugs pragma was written by Brian Ingerson <INGY@cpan.org> .

AVAILABILITY

Pugs is available for most operating systems to which GHC has been ported, including many Unix-like platforms as well as (with several limitations) Windows. See "Supported Platforms" in perl::port for a listing (to be written), and the README file in the source distribution.

ENVIRONMENT

See pugs::run.

AUTHOR

Perl was conceived and nurtured by Larry Wall <larry@wall.org>.

Pugs was written by Autrijus Tang <autrijus@autrijus.org>, with the help of oodles of other folks; see the AUTHORS file.

BUGS

Pugs is still under heavy development. If you find a bug, please report it (with a test case, if possible -- see t/README) on #perl6 on irc.freenode.org.