DBR

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

example/schemas/rt_55/sql
lib/DBR.pm
lib/DBR/Admin.pm
lib/DBR/Admin/Exception.pm
lib/DBR/Admin/Utility.pm
lib/DBR/Admin/Window.pm
lib/DBR/Admin/Window/EnumList.pm
lib/DBR/Admin/Window/FieldList.pm
lib/DBR/Admin/Window/FieldRelationshipList.pm
lib/DBR/Admin/Window/InstanceList.pm
lib/DBR/Admin/Window/MainMenu.pm
lib/DBR/Admin/Window/RelationshipList.pm
lib/DBR/Admin/Window/SchemaList.pm
lib/DBR/Admin/Window/TableList.pm
lib/DBR/Common.pm
lib/DBR/Config.pm
lib/DBR/Config/Field.pm
lib/DBR/Config/Field/Anon.pm
lib/DBR/Config/Field/Common.pm
lib/DBR/Config/Instance.pm
lib/DBR/Config/MetaSpec.pm

bin/dbr-admin  view on Meta::CPAN


# the contents of this file are Copyright (c) 2004-2009 David Blood
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation.

use strict;
use Curses::UI;

use lib qw'../lib ../../lib';
use DBR::Admin::Window::MainMenu;
use DBR::Admin::Utility;



my $conf = shift;
my $logfile = shift || '/tmp/dbr-admin_lastrun_debug.txt';

# stderr gets messed up by curses, so put stuff in a logfile for easier reading
open STDERR, ">$logfile";

bin/dbr-admin  view on Meta::CPAN

    exit;
}

DBR::Admin::Utility::get_dbrh($conf);

my $cui = new Curses::UI( 
			 -color_support => 1,
			 -mouse_support => 1,
			);

DBR::Admin::Window::MainMenu->new({ id => 'DBR Admin Main Menu', parent => $cui});

$cui->set_binding( \&exit_dialog , "\cQ");
$cui->set_binding( \&exit_dialog , "\cC");

$cui->mainloop();

################################
sub exit_dialog
{
    my $return = $cui->dialog(

lib/DBR/Admin/Window.pm  view on Meta::CPAN

	$self->set_id($_args->{id});

	$w->focus();
    }

    ###################
    sub close {

	my ($self, $_args) = @_;

	if ($self->get_id eq 'DBR Admin Main Menu') {
	    my $return = $self->get_win->root->dialog(
			      -message   => "Do you really want to quit?",
			      -title     => "Are you sure???", 
			      -buttons   => ['yes', 'no'],
				      
			     );

	    exit(0) if $return;
	}

lib/DBR/Admin/Window/MainMenu.pm  view on Meta::CPAN


# the contents of this file are Copyright (c) 2004-2009 David Blood
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation.

package DBR::Admin::Window::MainMenu;



use strict;
use Class::Std;
use Data::Dumper;

## fix
use lib '/drj/tools/perl-dbr/lib';
use DBR::Admin::Window;

lib/DBR/Admin/Window/MainMenu.pm  view on Meta::CPAN

		     );
    my @menu_values = keys %menu_labels;

    ####################
    sub BUILD {

	my ($self, $ident, $_args) = @_;


	my $listbox = $self->get_win->add(
					  'mainMenulist', 'Listbox',
					  -y => 2,
					  -width => 15,
					  -height => 4,
					  -values    => \@menu_values,
					  -labels    => \%menu_labels,
					  -onchange => sub { $self->listbox_select(shift); },
					 );

	$listbox->draw();



( run in 0.688 second using v1.01-cache-2.11-cpan-49f99fa48dc )