diff _test/temp.pl @ 398:38cb0b80e88e

minor changes
author sergey
date Thu, 08 May 2014 03:53:17 +0400
parents 212cc86e470b
children f23fcb19d3c1
line wrap: on
line diff
--- a/_test/temp.pl	Mon May 05 18:17:03 2014 +0400
+++ b/_test/temp.pl	Thu May 08 03:53:17 2014 +0400
@@ -1,31 +1,11 @@
 #!/usr/bin/perl
 use strict;
 
-use Time::HiRes qw(gettimeofday tv_interval);
-
-my $hash = {
-	x => 2.0,
-	y => 2.0,
-	z => 2.3,
-	w => 1.0
-};
-
-my $t = [gettimeofday];
+my $p = 'sometype';
+my $c = 'My::App::aSomeType';
 
-for(my $i = 0; $i < 1000000; $i ++) {
-	$hash->{x} = $i;
-}
-
-
-print "HASH: ",tv_interval($t,[gettimeofday]),"\n";
-
+my $suffix = substr($c, -length($p));
+my $prefix = substr($c, 0, -length($p));
+print join ("\n",$suffix,$prefix,$p,$c), "\n";
 
-my $array = [2,2,2.3,1.0];
-
-$t = [gettimeofday];
-
-for(my $i = 0; $i < 1000000; $i ++) {
-	$array->[1] = $i;
-}
-
-print "ARRAY: ",tv_interval($t,[gettimeofday]),"\n";
\ No newline at end of file
+print $prefix && not(substr($prefix,-2) eq '::') ? 'corrupted' : 'class' ;
\ No newline at end of file