GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ACME::BUTFIRST (3)

.ds Aq ’

NAME

Acme::ButFirst - Do something, but first do something else.

CONTENTS

SYNOPSIS



        use Acme::ButFirst;

        # Print a greeting, but first find caffiene.

        {
                print "Good morning!\n";
        } but first {
                print "I need a coffee\n";
        }

        # Count from 1 to 10, but first print a statement
        # about our counting skills.

        foreach my $count (1..10) {
                print "$count\n";
        } but first {
                print "I can count to...";
        }

        # Print our lines, but first reverse them, but first convert
        # them into upper case.

        while (<>) {
                print;
        } butfirst {
                $_ = reverse $_;
        } butfirst {
                $_ = uc $_;
        }



DESCRIPTION

Acme::ButFirst allows you to execute a block of code, but first do something else. Perfect for when you wish to add to the start of a long block of code, but don’t have the energy to scroll upwards in your editor.

Acme::ButFirst recognises both butfirst and but first as keywords.

Usage of Acme::ButFirst is lexically scoped. ButFirstification can be explicitly disabled by using no Acme::ButFirst.

SEE ALSO

<http://lists.slug.org.au/archives/slug/2005/09/msg00346.html>

Acme::Dont::t, Acme::ComeFrom, Acme::Goto::Line

BUGS

Any use of this module should be considered a bug.

Strings in the form of " { work } but first { coffee } " may sometimes be incorrectly munged.

AUTHOR

Paul Fenwick <pjf@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Paul Fenwick

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ACME::BUTFIRST (3) 2005-09-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.