Changeset 1927 for branches/release-35/lib/MT.pm.pre
- Timestamp:
- 04/16/08 15:36:30 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-35/lib/MT.pm.pre (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-35/lib/MT.pm.pre
r1871 r1927 58 58 no strict 'refs'; 59 59 unless ( defined *{ $compat . '::' } ) { 60 eval " require $compat;";60 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire $compat;"; 61 61 } 62 62 } … … 267 267 return $object_types{$k} if exists $object_types{$k}; 268 268 269 if ($k =~ m/^(.+):meta$/) { 270 my $ppkg = $pkg->model($1); 271 my $mpkg = $ppkg->meta_pkg; 272 return $mpkg ? $object_types{$k} = $mpkg : undef; 273 } 274 269 275 my $model = $pkg->registry( 'object_types', $k ); 270 276 if ( ref($model) eq 'ARRAY' ) { … … 287 293 unless ( defined *{ $model . '::__properties' } ) { 288 294 use strict 'refs'; 289 eval " require $model;";295 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire $model;"; 290 296 if ( $@ && ( $k =~ m/^(.+)\./ ) ) { 291 297 … … 612 618 613 619 $cb->error(); # reset the error string 614 my $result = eval { $cb->invoke(@args) }; 620 my $result = eval { 621 # line __LINE__ __FILE__ 622 $cb->invoke(@args); 623 }; 615 624 if ( my $err = $@ ) { 616 625 $cb->error($err); … … 1262 1271 $Plugins{$plugin_sig}{full_path} = $plugin_full_path; 1263 1272 $timer->pause_partial if $timer; 1264 eval { require $plugin };1273 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire '$plugin';"; 1265 1274 $timer->mark("Loaded plugin " . $sig) if $timer; 1266 1275 if ($@) { … … 1270 1279 # the database has been initialized... 1271 1280 eval { 1281 # line __LINE__ __FILE__ 1272 1282 require MT::Log; 1273 1283 $mt->log( … … 2588 2598 if ($method) { 2589 2599 return sub { 2590 eval " require $hdlr_pkg;"2600 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire $hdlr_pkg;" 2591 2601 or Carp::confess( 2592 2602 "failed loading package $hdlr_pkg for routine $name: $@"); … … 2599 2609 else { 2600 2610 return sub { 2601 eval " require $hdlr_pkg;"2611 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire $hdlr_pkg;" 2602 2612 or Carp::confess( 2603 2613 "failed loading package $hdlr_pkg for routine $name: $@"); … … 2613 2623 } 2614 2624 else { 2615 eval " require $hdlr_pkg;"2625 eval "# line " . __LINE__ . " " . __FILE__ . "\nrequire $hdlr_pkg;" 2616 2626 or Carp::confess( 2617 2627 "failed loading package $hdlr_pkg for routine $name: $@");
