NAME

Sub::Called - get information about how the subroutine is called

VERSION

Version 0.01

SYNOPSIS

use Sub::Called;

sub test {
    if( Sub::Called::with_ampersand() ){
        print "you called this subroutine this way: &test\n",
              "note that this disables prototypes!\n";
    }
}

FUNCTIONS

with_ampersand

LIMITATIONS

It seems that there are some problems with subroutine references.

This may not work:

sub test2 {
    if( Sub::Called::with_ampersand() ){
        die "die hard";
    }
};
  
my $sub2 = main->can( 'test2' );
&$sub2();

AUTHOR

Renee Baecker, <module at renee-baecker.de>

BUGS

Please report any bugs or feature requests to bug-sub-called at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sub-Called. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Sub::Called

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Renee Baecker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.