Skip to content

cygx/p6-debug

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Name

DEBUG - Experimental debugging macros

Synopsis

    perl6 -MDEBUG -e 'use dbg; dbg note "debugging..."'
    perl6 -MDEBUG -e 'use assert; assert 0 > 1'
    perl6 -MDEBUG -e 'use logger; logger "hello world"'
    use dbg;
    use assert &warn;
    use logger &say;

    use DEBUG;

    logger 'Printing to STDOUT...';
    dbg say 'Also prints to STDOUT...';
    assert !'Only a warning';

    use NDEBUG <logger>;

    dbg note 'Logging disabled';
    logger do {
        sleep(42);
        'This will never be executed...';
    };

    use DEBUG <logger>;

    dbg note 'Logging enabled';
    logger 'Alive!';

Bugs and Development

Development happens at GitHub. If you found a bug or have a feature request, use the issue tracker over there.

Copyright and License

Copyright (C) 2015 by cygx@cpan.org

Distributed under the Boost Software License, Version 1.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%