Permalink
Browse files

reduce number of debug warnings

  • Loading branch information...
1 parent 8d18cf7 commit b222b2a02954ab0048664f43479eb04b4ce800b2 @lstein lstein committed Aug 30, 2011
Showing with 3 additions and 17 deletions.
  1. +0 −6 lib/Bio/Graphics/Browser2/Action.pm
  2. +3 −11 lib/Bio/Graphics/Browser2/Render.pm
View
6 lib/Bio/Graphics/Browser2/Action.pm
@@ -89,14 +89,11 @@ sub ACTION_navigate {
my $source = $self->data_source;
my $settings = $self->settings;
- warn "navigate name WAS = $settings->{name}";
-
my $action = $q->param('navigate') or croak "for the navigate action, a CGI argument named \"navigate\" must be present";
my $view_start = $q->param('view_start');
my $view_stop = $q->param('view_stop');
unless (!defined $view_start or $view_start eq 'NaN' or $view_stop eq 'NaN') {
- warn "updating view_start etc";
$render->state->{view_start} = ($view_start && $view_start >= 0)? $view_start : $render->state->{view_start},
$render->state->{view_stop} = ($view_stop && $view_stop >= 0)? $view_stop : $render->state->{view_stop},
}
@@ -132,7 +129,6 @@ sub ACTION_navigate {
region_scale_bar => $region_scale_return_object,
detail_scale_bar => $detail_scale_return_object,
};
- warn "navigate name NOW = $settings->{name}";
$self->session->flush;
return (200,'application/json',$return_object);
}
@@ -375,8 +371,6 @@ sub ACTION_save_snapshot {
$snapshots->{$name}{data} = $snapshot;
$snapshots->{$name}{session_time} = $UTCtime;
- warn "save_snapshot(start=",$snapshots->{$name}{data}{start},')';
-
# Each snapshot has a unique snapshot_id (currently just an md5 sum of the unix time it is created
my $snapshot_id = md5_hex(time);
$snapshots->{$name}{snapshot_id} = $snapshot_id;
View
14 lib/Bio/Graphics/Browser2/Render.pm
@@ -78,7 +78,6 @@ sub new {
$self->session($session);
$self->state($session->page_settings);
warn "render(start = ",$self->state->{start},")";
- warn "render(NAME = ",$self->state->{name},")";
$self->set_language();
$self->set_signal_handlers();
$self;
@@ -280,10 +279,8 @@ sub run {
warn "[$$] init()" if $debug;
$self->init();
- warn "[$$] update_state()";# if $debug;
- warn "NAME WAS ",$self->state->{name};
+ warn "[$$] update_state()" if $debug;
$self->update_state();
- warn "NAME IS ",$self->state->{name};
# EXPERIMENTAL CODE -- GET RID OF THE URL PARAMETERS
if ($ENV{QUERY_STRING} && $ENV{QUERY_STRING} =~ /reset/) {
@@ -352,7 +349,7 @@ sub run_asynchronous_event {
my $self = shift;
my ($status, $mime_type, $data, %headers) = $self->asynchronous_event or return;
- warn "[$$] asynchronous event returning status=$status, mime-type=$mime_type"; # if DEBUG;
+ warn "[$$] asynchronous event returning status=$status, mime-type=$mime_type" if TRACE_RUN;
# add the cookies!
$headers{-cookie} = [$self->state_cookie,$self->auth_cookie];
@@ -391,7 +388,7 @@ sub asynchronous_event {
my $settings = $self->state;
my $events;
- warn "[$$] asynchronous event(",query_string(),")";# if TRACE_RUN;
+ warn "[$$] asynchronous event(",query_string(),")" if TRACE_RUN;
# TO ADD AN ASYNCHRONOUS REQUEST...
# 1. Give the request a unique name, such as "foo"
@@ -2468,9 +2465,7 @@ sub update_coordinates {
undef $state->{stop};
undef $state->{view_start};
undef $state->{view_stop};
- warn "NAME WAS $state->{name}";
$state->{name} = $state->{search_str} = param('name') || param('q');
- warn "NAME IS $state->{name}";
$state->{dbid} = param('dbid'); # get rid of this
}
}
@@ -2688,7 +2683,6 @@ sub asynchronous_update_element {
return $container;
}
elsif ( $element eq 'landmark_search_field' ) {
- warn "name = ",$self->state->{name};
return $self->state->{name};
}
elsif ( $element eq 'overview_panels' ) {
@@ -2738,7 +2732,6 @@ sub asynchronous_update_coordinates {
my $action = shift;
my $state = $self->state;
- warn "NAME WAS $state->{name}";
my $whole_segment_start = $state->{seg_min};
my $whole_segment_stop = $state->{seg_max};
@@ -2814,7 +2807,6 @@ sub asynchronous_update_coordinates {
# update our "name" state and the CGI parameter
$state->{name} = $self->region_string;
- warn "asynchronous_update_coordinates(): NAME IS $state->{name}";
}
$self->session->flush();

0 comments on commit b222b2a

Please sign in to comment.