in reply to Re: How to optimise " csv into mysql " using TEXT:CSV_XS and DBD::Mysql
in thread How to optimise " csv into mysql " using Text:CSV_XS and DBD::Mysql

Tried Devel::Profile, but its somehow not running and giving the error
String found where operator expected at (eval 8)[C:/Strawberry/perl/si +te/lib/Devel/Profile.pm:133] line 2, near "croak 'usage: $io->getline +()'" (Do you need to predeclare croak?) <br>syntax error at (eval 8)[C:/Strawberry/perl/site/lib/Devel/Profile +.pm:133] line 2, near "croak 'usage: $io->getline()'"
  • Comment on Re^2: How to optimise " csv into mysql " using TEXT:CSV_XS and DBD::Mysql
  • Download Code

Replies are listed 'Best First'.
Re^3: How to optimise " csv into mysql " using TEXT:CSV_XS and DBD::Mysql
by GrandFather (Saint) on Aug 06, 2015 at 09:53 UTC

    Sorry, it's a while since I profiled code. I suspect in fact that I used Devel::NYTProf (but forgot the module name) rather than Devel::Profile. I've just installed and run NYTProf against a test script and it all worked as advertised.

    Premature optimization is the root of all job security

      Used the Devel:NYTProf module, but need to find out how to read the output, becasue its fr more complex then Devel:ProfileBut it looks very very usefull, thank you

        After running
        perl -d:NYTProf script.pl

        just run the nytprofhtml utility and view the resulting nytprof/index.html in your favourite browser.

        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: How to optimise " csv into mysql " using TEXT:CSV_XS and DBD::Mysql
by Laurent_R (Canon) on Aug 06, 2015 at 09:39 UTC
    croak is a function exported by the Carp module. Try to add this to your code:
    use Carp;
      nope it didn't help
        Did you put the:
        use Carp;
        line before the:
        use Devel::Profile;
        line?

        If this still does not work, then please show how you're using the Devel::Profile module.

      I had Carp after Devel in my code; changed it, but still getting the same error