houseabsolute / HTML-Mason

High-performance, dynamic web site authoring system
https://metacpan.org/release/HTML-Mason/
Other
9 stars 18 forks source link

$DB::single does not work properly because of wrong #line derectives #15

Open autarch opened 4 years ago

autarch commented 4 years ago

Migrated from rt.cpan.org #111435 (status was 'new')

Requestors:

From kes-kes@yandex.ru on 2016-01-26 11:00:28 :

Please notice the order: line 17, 20, 40, 24, 38, 59, 68, 91, 4 And when I put $DB::single on line 74 the script is stopped really at line 6 instead. because of at those lines located something else: 73: #line 4 "/home/feelsafe/public_html/www/listeners/dhandler" 74: 'code' => sub {

x75: use utf8;

The real DB::handler lines: 74: $DB::single = 1; 75: if( my $row = $m->comp( 'PARENT:query_rows', %ARGS ) ) { 76: return $row->search(

The perl see it as: DBG>l 0 /home/feelsafe/public_html/www/listeners/dhandler x1: $m->print( ' x2: return 'Listeners'; x3: ;return; x4: $m->print( ' 5: 6: 7: ' ); 8: #line 17 "/home/feelsafe/public_html/www/listeners/dhandler" x9: ;return; 10: }, 11: 12: ) 13: , 14: 'js_body' => HTML::Mason::Component::Subcomponent->new( 15: 'code' => sub {

DBG>l /home/feelsafe/public_html/www/listeners/dhandler x16: use utf8; x17: $m->print( ' 18: 19: x20: $m->comp( 'SELF:content', %ARGS
21: ); #line 20 "/home/feelsafe/public_html/www/listeners/dhandler" x22: $m->print( ' 23: 24: 25: 26: ' ); 27: #line 40 "/home/feelsafe/public_html/www/listeners/dhandler" 28: x29: my $servers = $DBIC->resultset('Server')->search(); 30: #line 24 "/home/feelsafe/public_html/www/listeners/dhandler" x31: $m->print( '

Listeners

32: # name => 'server_id', 33: $m->comp( '/lib/xhtml/select', 34: label => 'Server', 35: name_column => 'hostname', 36: selected => $form{ hpanel }{ id }, x37: rs => $servers 38:
39: ); #line 38 "/home/feelsafe/public_html/www/listeners/dhandler" x40: $m->print( ' 41: 42: 43: 44: ' ); 45: #line 59 "/home/feelsafe/public_html/www/listeners/dhandler" 46:

DBG>l /home/feelsafe/public_html/www/listeners/dhandler 47: var sel = newrow.cells[1].getElementsByTagName(\'select\')[0].outerHTML; 48: newrow.cells[1].innerHTML = sel; 49: sel = newrow.cells[1].children[0]; 50: $( sel ).selectBox(\'attach\'); 51: 52: var sel = newrow.cells[2].getElementsByTagName(\'select\')[0].outerHTML; 53: newrow.cells[2].innerHTML = sel; 54: sel = newrow.cells[2].children[0]; 55: $( sel ).selectBox(\'attach\'); 56: 57: newrow.cells[3].children[0].value = \'\'; 58: ' ); x59: $m->print( ' 60: 61: 62: ' ); 63: #line 68 "/home/feelsafe/public_html/www/listeners/dhandler" 64: 65: ); 66: HTML::Mason::Component::FileBased->new( 67: 'code' => sub { x68: $m->print( ' 69: 70: 71: ' ); 72: #line 91 "/home/feelsafe/public_html/www/listeners/dhandler" 73: #line 4 "/home/feelsafe/public_html/www/listeners/dhandler" 74: 'code' => sub {

x75: use utf8; x76: HTML::Mason::Exception::Params->throw 77: ( error =>