Giter VIP home page Giter VIP logo

db-pluggable's Introduction

NAME
    DB::Pluggable - Add plugin support for the Perl debugger

SYNOPSIS
        $ cat ~/.perldb
        use DB::Pluggable;
        DB::Pluggable->run_with_config(\<<EOINI)
        [BreakOnTestNumber]

        [TypeAhead]
        type = {l
        type = c
        ifenv = DBTYPEAHEAD

        [StackTraceAsHTML]
        [DataPrinter]
        EOINI

    Then:

        $ perl -d foo.pl

DESCRIPTION
    This class adds plugin support to the Perl debugger. It is based on
    Brickyard, so see its documentation for details.

    You need to have a "~/.perldb" file (see perldebug for details) that
    invokes the plugin mechanism.

    Plugins should live in the "DB::Pluggable::Plugin::" namespace, like
    DB::Pluggable::Plugin::BreakOnTestNumber does.

METHODS
  run_with_config
    Convenience class method to create, initialize and run the plugin system
    with the given configuration file or scalar reference.

  plugins_with
    Like the method with the same name in Brickyard.

  init_from_config
    Like the method with the same name in Brickyard.

  enable_watchfunction
    Tells the debugger to call "DB::watchfunction()", which in turn calls
    the "watchfunction()" method of all plugins that consume the
    "-WatchFunction" role.

  run
    This method just calls the "initialize()" method of all plugins that
    consume the "-Initializer" role.

Plugin Phases
    This class is very much in beta, so it's more like a proof of concept.
    Therefore, not all roles - which more or less correspond to plugin
    phases - imaginable have been added, only the ones to make this demo
    work. If you want more roles or if the current roles don't work for you,
    let me know.

    The following roles exist:

    "-Initializer"
        See DB::Pluggable::Role::Initializer.

    "-WatchFunction"
        See DB::Pluggable::Role::WatchFunction.

    "-AfterInit"
        See DB::Pluggable::Role::AfterInit.

    "-Eval"
        See DB::Pluggable::Role::Eval. The debugger's "eval()" function is
        overridden so we can make it pluggable. Each plugin will get a
        chance to inspect the command line, which is the last line in
        $DB::evalarg and act on it. The plugin can return a code reference
        which will be executed after the original "DB::eval()" function has
        finished. Using the code reference you can undo any temporary
        changes you might have introduced to make your command work.

AUTHOR
    The following person is the author of all the files provided in this
    distribution unless explicitly noted otherwise.

    Marcel Gruenauer <[email protected]>

COPYRIGHT AND LICENSE
    The following copyright notice applies to all the files provided in this
    distribution, including binary files, unless explicitly noted otherwise.

    This software is copyright (c) 2008-2011 by Marcel Gruenauer.

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

db-pluggable's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.